From 016e201d179966fa4940d5d04d0f96bd72fce01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Sun, 8 Sep 2024 23:53:40 +0200 Subject: [PATCH] Use backticks for SFML types in doc comments --- include/SFML/Audio/InputSoundFile.hpp | 18 +- include/SFML/Audio/Listener.hpp | 42 ++--- include/SFML/Audio/Music.hpp | 100 +++++------ include/SFML/Audio/OutputSoundFile.hpp | 6 +- include/SFML/Audio/PlaybackDevice.hpp | 6 +- include/SFML/Audio/Sound.hpp | 40 ++--- include/SFML/Audio/SoundBuffer.hpp | 86 ++++----- include/SFML/Audio/SoundBufferRecorder.hpp | 18 +- include/SFML/Audio/SoundChannel.hpp | 4 +- include/SFML/Audio/SoundFileFactory.hpp | 26 +-- include/SFML/Audio/SoundFileReader.hpp | 6 +- include/SFML/Audio/SoundFileWriter.hpp | 6 +- include/SFML/Audio/SoundRecorder.hpp | 64 +++---- include/SFML/Audio/SoundSource.hpp | 100 +++++------ include/SFML/Audio/SoundStream.hpp | 50 +++--- include/SFML/GpuPreference.hpp | 2 +- include/SFML/Graphics/BlendMode.hpp | 20 +-- include/SFML/Graphics/CircleShape.hpp | 18 +- include/SFML/Graphics/Color.hpp | 24 +-- include/SFML/Graphics/ConvexShape.hpp | 20 +-- include/SFML/Graphics/CoordinateType.hpp | 2 +- include/SFML/Graphics/Drawable.hpp | 12 +- include/SFML/Graphics/Font.hpp | 90 +++++----- include/SFML/Graphics/Glsl.hpp | 28 +-- include/SFML/Graphics/Glsl.inl | 2 +- include/SFML/Graphics/Glyph.hpp | 4 +- include/SFML/Graphics/Image.hpp | 78 ++++---- include/SFML/Graphics/PrimitiveType.hpp | 2 +- include/SFML/Graphics/Rect.hpp | 32 ++-- include/SFML/Graphics/RectangleShape.hpp | 12 +- include/SFML/Graphics/RenderStates.hpp | 18 +- include/SFML/Graphics/RenderTarget.hpp | 52 +++--- include/SFML/Graphics/RenderTexture.hpp | 52 +++--- include/SFML/Graphics/RenderWindow.hpp | 42 ++--- include/SFML/Graphics/Shader.hpp | 138 +++++++------- include/SFML/Graphics/Shape.hpp | 46 ++--- include/SFML/Graphics/Sprite.hpp | 48 ++--- include/SFML/Graphics/StencilMode.hpp | 40 ++--- include/SFML/Graphics/Text.hpp | 76 ++++---- include/SFML/Graphics/Texture.hpp | 200 ++++++++++----------- include/SFML/Graphics/Transform.hpp | 76 ++++---- include/SFML/Graphics/Transformable.hpp | 52 +++--- include/SFML/Graphics/Vertex.hpp | 4 +- include/SFML/Graphics/VertexArray.hpp | 24 +-- include/SFML/Graphics/VertexBuffer.hpp | 62 +++---- include/SFML/Graphics/View.hpp | 40 ++--- include/SFML/Network/Ftp.hpp | 58 +++--- include/SFML/Network/Http.hpp | 36 ++-- include/SFML/Network/IpAddress.hpp | 50 +++--- include/SFML/Network/Packet.hpp | 44 ++--- include/SFML/Network/Socket.hpp | 12 +- include/SFML/Network/SocketSelector.hpp | 28 +-- include/SFML/Network/TcpListener.hpp | 20 +-- include/SFML/Network/TcpSocket.hpp | 32 ++-- include/SFML/Network/UdpSocket.hpp | 36 ++-- include/SFML/System/Angle.hpp | 110 ++++++------ include/SFML/System/Clock.hpp | 30 ++-- include/SFML/System/Err.hpp | 6 +- include/SFML/System/FileInputStream.hpp | 10 +- include/SFML/System/InputStream.hpp | 10 +- include/SFML/System/MemoryInputStream.hpp | 8 +- include/SFML/System/Sleep.hpp | 4 +- include/SFML/System/String.hpp | 138 +++++++------- include/SFML/System/SuspendAwareClock.hpp | 8 +- include/SFML/System/Time.hpp | 108 +++++------ include/SFML/System/Utf.hpp | 36 ++-- include/SFML/System/Vector2.hpp | 116 ++++++------ include/SFML/System/Vector3.hpp | 96 +++++----- include/SFML/Window/Clipboard.hpp | 10 +- include/SFML/Window/Context.hpp | 12 +- include/SFML/Window/ContextSettings.hpp | 2 +- include/SFML/Window/Cursor.hpp | 76 ++++---- include/SFML/Window/Event.hpp | 10 +- include/SFML/Window/Joystick.hpp | 28 +-- include/SFML/Window/Keyboard.hpp | 32 ++-- include/SFML/Window/Mouse.hpp | 16 +- include/SFML/Window/Sensor.hpp | 12 +- include/SFML/Window/Touch.hpp | 10 +- include/SFML/Window/VideoMode.hpp | 40 ++--- include/SFML/Window/Vulkan.hpp | 8 +- include/SFML/Window/Window.hpp | 66 +++---- include/SFML/Window/WindowBase.hpp | 85 +++++---- include/SFML/Window/WindowHandle.hpp | 4 +- src/SFML/Audio/AudioDevice.hpp | 2 +- src/SFML/Window/DRM/DRMContext.hpp | 4 +- src/SFML/Window/VulkanImpl.hpp | 2 +- src/SFML/Window/macOS/HIDInputManager.hpp | 4 +- 87 files changed, 1653 insertions(+), 1654 deletions(-) diff --git a/include/SFML/Audio/InputSoundFile.hpp b/include/SFML/Audio/InputSoundFile.hpp index 50436ad4f..d315af62d 100644 --- a/include/SFML/Audio/InputSoundFile.hpp +++ b/include/SFML/Audio/InputSoundFile.hpp @@ -118,7 +118,7 @@ public: /// /// \param filename Path of the sound file to load /// - /// \return True if the file was successfully opened + /// \return `true` if the file was successfully opened /// //////////////////////////////////////////////////////////// [[nodiscard]] bool openFromFile(const std::filesystem::path& filename); @@ -132,7 +132,7 @@ public: /// \param data Pointer to the file data in memory /// \param sizeInBytes Size of the data to load, in bytes /// - /// \return True if the file was successfully opened + /// \return `true` if the file was successfully opened /// //////////////////////////////////////////////////////////// [[nodiscard]] bool openFromMemory(const void* data, std::size_t sizeInBytes); @@ -145,7 +145,7 @@ public: /// /// \param stream Source stream to read from /// - /// \return True if the file was successfully opened + /// \return `true` if the file was successfully opened /// //////////////////////////////////////////////////////////// [[nodiscard]] bool openFromStream(InputStream& stream); @@ -178,11 +178,11 @@ public: /// \brief Get the map of position in sample frame to sound channel /// /// This is used to map a sample in the sample stream to a - /// position during spatialisation. + /// position during spatialization. /// /// \return Map of position in sample frame to sound channel /// - /// \see getSampleRate, getChannelCount, getDuration + /// \see `getSampleRate`, `getChannelCount`, `getDuration` /// //////////////////////////////////////////////////////////// [[nodiscard]] const std::vector& getChannelMap() const; @@ -301,10 +301,10 @@ private: /// \ingroup audio /// /// This class decodes audio samples from a sound file. It is -/// used internally by higher-level classes such as sf::SoundBuffer -/// and sf::Music, but can also be useful if you want to process +/// used internally by higher-level classes such as `sf::SoundBuffer` +/// and `sf::Music`, but can also be useful if you want to process /// or analyze audio files without playing them, or if you want to -/// implement your own version of sf::Music with more specific +/// implement your own version of `sf::Music` with more specific /// features. /// /// Usage example: @@ -331,6 +331,6 @@ private: /// while (count > 0); /// \endcode /// -/// \see sf::SoundFileReader, sf::OutputSoundFile +/// \see `sf::SoundFileReader`, `sf::OutputSoundFile` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Audio/Listener.hpp b/include/SFML/Audio/Listener.hpp index e7d73562d..e58be7897 100644 --- a/include/SFML/Audio/Listener.hpp +++ b/include/SFML/Audio/Listener.hpp @@ -45,9 +45,9 @@ namespace sf::Listener /// /// Sounds will play at gain 1 when they are positioned /// within the inner angle of the cone. Sounds will play -/// at outerGain when they are positioned outside the +/// at `outerGain` when they are positioned outside the /// outer angle of the cone. The gain declines linearly -/// from 1 to outerGain as the sound moves from the inner +/// from 1 to `outerGain` as the sound moves from the inner /// angle to the outer angle. /// //////////////////////////////////////////////////////////// @@ -61,13 +61,13 @@ struct Cone //////////////////////////////////////////////////////////// /// \brief Change the global volume of all the sounds and musics /// -/// The volume is a number between 0 and 100; it is combined with -/// the individual volume of each sound / music. +/// \a `volume` is a number between 0 and 100; it is combined +/// with the individual volume of each sound / music. /// The default value for the volume is 100 (maximum). /// /// \param volume New global volume, in the range [0, 100] /// -/// \see getGlobalVolume +/// \see `getGlobalVolume` /// //////////////////////////////////////////////////////////// SFML_AUDIO_API void setGlobalVolume(float volume); @@ -77,7 +77,7 @@ SFML_AUDIO_API void setGlobalVolume(float volume); /// /// \return Current global volume, in the range [0, 100] /// -/// \see setGlobalVolume +/// \see `setGlobalVolume` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_AUDIO_API float getGlobalVolume(); @@ -89,7 +89,7 @@ SFML_AUDIO_API void setGlobalVolume(float volume); /// /// \param position New listener's position /// -/// \see getPosition, setDirection +/// \see `getPosition`, `setDirection` /// //////////////////////////////////////////////////////////// SFML_AUDIO_API void setPosition(const Vector3f& position); @@ -99,7 +99,7 @@ SFML_AUDIO_API void setPosition(const Vector3f& position); /// /// \return Listener's position /// -/// \see setPosition +/// \see `setPosition` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_AUDIO_API Vector3f getPosition(); @@ -116,7 +116,7 @@ SFML_AUDIO_API void setPosition(const Vector3f& position); /// /// \param direction New listener's direction /// -/// \see getDirection, setUpVector, setPosition +/// \see `getDirection`, `setUpVector`, `setPosition` /// //////////////////////////////////////////////////////////// SFML_AUDIO_API void setDirection(const Vector3f& direction); @@ -126,7 +126,7 @@ SFML_AUDIO_API void setDirection(const Vector3f& direction); /// /// \return Listener's forward vector (not normalized) /// -/// \see setDirection +/// \see `setDirection` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_AUDIO_API Vector3f getDirection(); @@ -138,7 +138,7 @@ SFML_AUDIO_API void setDirection(const Vector3f& direction); /// /// \param velocity New listener's velocity /// -/// \see getVelocity, getDirection, setUpVector, setPosition +/// \see `getVelocity`, `getDirection`, `setUpVector`, `setPosition` /// //////////////////////////////////////////////////////////// SFML_AUDIO_API void setVelocity(const Vector3f& velocity); @@ -148,7 +148,7 @@ SFML_AUDIO_API void setVelocity(const Vector3f& velocity); /// /// \return Listener's velocity /// -/// \see setVelocity +/// \see `setVelocity` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_AUDIO_API Vector3f getVelocity(); @@ -157,11 +157,11 @@ SFML_AUDIO_API void setVelocity(const Vector3f& velocity); /// \brief Set the cone properties of the listener in the audio scene /// /// The cone defines how directional attenuation is applied. -/// The default cone of a sound is {2 * PI, 2 * PI, 1}. +/// The default cone of a sound is (2 * PI, 2 * PI, 1). /// /// \param cone Cone properties of the listener in the scene /// -/// \see getCone +/// \see `getCone` /// //////////////////////////////////////////////////////////// SFML_AUDIO_API void setCone(const Listener::Cone& cone); @@ -171,7 +171,7 @@ SFML_AUDIO_API void setCone(const Listener::Cone& cone); /// /// \return Cone properties of the listener /// -/// \see setCone +/// \see `setCone` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_AUDIO_API Listener::Cone getCone(); @@ -188,7 +188,7 @@ SFML_AUDIO_API void setCone(const Listener::Cone& cone); /// /// \param upVector New listener's up vector /// -/// \see getUpVector, setDirection, setPosition +/// \see `getUpVector`, `setDirection`, `setPosition` /// //////////////////////////////////////////////////////////// SFML_AUDIO_API void setUpVector(const Vector3f& upVector); @@ -198,7 +198,7 @@ SFML_AUDIO_API void setUpVector(const Vector3f& upVector); /// /// \return Listener's upward vector (not normalized) /// -/// \see setUpVector +/// \see `setUpVector` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_AUDIO_API Vector3f getUpVector(); @@ -211,11 +211,11 @@ SFML_AUDIO_API void setUpVector(const Vector3f& upVector); /// /// The audio listener defines the global properties of the /// audio environment, it defines where and how sounds and musics -/// are heard. If sf::View is the eyes of the user, then sf::Listener -/// is his ears (by the way, they are often linked together -- -/// same position, orientation, etc.). +/// are heard. If `sf::View` is the eyes of the user, then +/// `sf::Listener` are their ears (by the way, they are often linked +/// together -- same position, orientation, etc.). /// -/// sf::Listener is a simple interface, which allows to setup the +/// `sf::Listener` is a simple interface, which allows to setup the /// listener in the 3D audio environment (position, direction and /// up vector), and to adjust the global volume. /// diff --git a/include/SFML/Audio/Music.hpp b/include/SFML/Audio/Music.hpp index bbf5e6655..3b7fb7045 100644 --- a/include/SFML/Audio/Music.hpp +++ b/include/SFML/Audio/Music.hpp @@ -77,20 +77,20 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct a music from an audio file /// - /// This function doesn't start playing the music (call play() + /// This function doesn't start playing the music (call `play()` /// to do so). - /// See the documentation of sf::InputSoundFile for the list + /// See the documentation of `sf::InputSoundFile` for the list /// of supported formats. /// /// \warning Since the music is not loaded at once but rather /// streamed continuously, the file must remain accessible until - /// the sf::Music object loads a new music or is destroyed. + /// the `sf::Music` object loads a new music or is destroyed. /// /// \param filename Path of the music file to open /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see openFromMemory, openFromStream + /// \see `openFromMemory`, `openFromStream` /// //////////////////////////////////////////////////////////// Music(const std::filesystem::path& filename); @@ -98,14 +98,14 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct a music from an audio file in memory /// - /// This function doesn't start playing the music (call play() + /// This function doesn't start playing the music (call `play()` /// to do so). - /// See the documentation of sf::InputSoundFile for the list + /// See the documentation of `sf::InputSoundFile` for the list /// of supported formats. /// /// \warning Since the music is not loaded at once but rather streamed /// continuously, the \a data buffer must remain accessible until - /// the sf::Music object loads a new music or is destroyed. That is, + /// the `sf::Music` object loads a new music or is destroyed. That is, /// you can't deallocate the buffer right after calling this function. /// /// \param data Pointer to the file data in memory @@ -113,7 +113,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see openFromFile, openFromStream + /// \see `openFromFile`, `openFromStream` /// //////////////////////////////////////////////////////////// Music(const void* data, std::size_t sizeInBytes); @@ -121,20 +121,20 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct a music from an audio file in a custom stream /// - /// This function doesn't start playing the music (call play() + /// This function doesn't start playing the music (call `play()` /// to do so). - /// See the documentation of sf::InputSoundFile for the list + /// See the documentation of `sf::InputSoundFile` for the list /// of supported formats. /// /// \warning Since the music is not loaded at once but rather - /// streamed continuously, the \a stream must remain accessible - /// until the sf::Music object loads a new music or is destroyed. + /// streamed continuously, the \a `stream` must remain accessible + /// until the `sf::Music` object loads a new music or is destroyed. /// /// \param stream Source stream to read from /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see openFromFile, openFromMemory + /// \see `openFromFile`, `openFromMemory` /// //////////////////////////////////////////////////////////// Music(InputStream& stream); @@ -160,20 +160,20 @@ public: //////////////////////////////////////////////////////////// /// \brief Open a music from an audio file /// - /// This function doesn't start playing the music (call play() + /// This function doesn't start playing the music (call `play()` /// to do so). - /// See the documentation of sf::InputSoundFile for the list + /// See the documentation of `sf::InputSoundFile` for the list /// of supported formats. /// /// \warning Since the music is not loaded at once but rather /// streamed continuously, the file must remain accessible until - /// the sf::Music object loads a new music or is destroyed. + /// the `sf::Music` object loads a new music or is destroyed. /// /// \param filename Path of the music file to open /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see openFromMemory, openFromStream + /// \see `openFromMemory`, `openFromStream` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool openFromFile(const std::filesystem::path& filename); @@ -181,22 +181,22 @@ public: //////////////////////////////////////////////////////////// /// \brief Open a music from an audio file in memory /// - /// This function doesn't start playing the music (call play() + /// This function doesn't start playing the music (call `play()` /// to do so). - /// See the documentation of sf::InputSoundFile for the list + /// See the documentation of `sf::InputSoundFile` for the list /// of supported formats. /// /// \warning Since the music is not loaded at once but rather streamed - /// continuously, the \a data buffer must remain accessible until - /// the sf::Music object loads a new music or is destroyed. That is, + /// continuously, the \a `data` buffer must remain accessible until + /// the `sf::Music` object loads a new music or is destroyed. That is, /// you can't deallocate the buffer right after calling this function. /// /// \param data Pointer to the file data in memory /// \param sizeInBytes Size of the data to load, in bytes /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see openFromFile, openFromStream + /// \see `openFromFile`, `openFromStream` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool openFromMemory(const void* data, std::size_t sizeInBytes); @@ -204,20 +204,20 @@ public: //////////////////////////////////////////////////////////// /// \brief Open a music from an audio file in a custom stream /// - /// This function doesn't start playing the music (call play() + /// This function doesn't start playing the music (call `play()` /// to do so). - /// See the documentation of sf::InputSoundFile for the list + /// See the documentation of `sf::InputSoundFile` for the list /// of supported formats. /// /// \warning Since the music is not loaded at once but rather - /// streamed continuously, the \a stream must remain accessible - /// until the sf::Music object loads a new music or is destroyed. + /// streamed continuously, the \a `stream` must remain accessible + /// until the `sf::Music` object loads a new music or is destroyed. /// /// \param stream Source stream to read from /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see openFromFile, openFromMemory + /// \see `openFromFile`, `openFromMemory` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool openFromStream(InputStream& stream); @@ -235,25 +235,25 @@ public: /// /// \return Loop Time position class. /// - /// \warning Since setLoopPoints() performs some adjustments on the + /// \warning Since `setLoopPoints()` performs some adjustments on the /// provided values and rounds them to internal samples, a call to - /// getLoopPoints() is not guaranteed to return the same times passed - /// into a previous call to setLoopPoints(). However, it is guaranteed + /// `getLoopPoints()` is not guaranteed to return the same times passed + /// into a previous call to `setLoopPoints()`. However, it is guaranteed /// to return times that will map to the valid internal samples of - /// this Music if they are later passed to setLoopPoints(). + /// this Music if they are later passed to `setLoopPoints()`. /// - /// \see setLoopPoints + /// \see `setLoopPoints` /// //////////////////////////////////////////////////////////// [[nodiscard]] TimeSpan getLoopPoints() const; //////////////////////////////////////////////////////////// - /// \brief Sets the beginning and duration of the sound's looping sequence using sf::Time + /// \brief Sets the beginning and duration of the sound's looping sequence using `sf::Time` /// - /// setLoopPoints() allows for specifying the beginning offset and the duration of the loop such that, when the music - /// is enabled for looping, it will seamlessly seek to the beginning whenever it - /// encounters the end of the duration. Valid ranges for timePoints.offset and timePoints.length are - /// [0, Dur) and (0, Dur-offset] respectively, where Dur is the value returned by getDuration(). + /// `setLoopPoints()` allows for specifying the beginning offset and the duration of the loop such that, + /// when the music is enabled for looping, it will seamlessly seek to the beginning whenever it + /// encounters the end of the duration. Valid ranges for `timePoints.offset` and `timePoints.length` are + /// [0, Dur) and (0, Dur-offset] respectively, where Dur is the value returned by `getDuration()`. /// Note that the EOF "loop point" from the end to the beginning of the stream is still honored, /// in case the caller seeks to a point after the end of the loop range. This function can be /// safely called at any point after a stream is opened, and will be applied to a playing sound @@ -264,7 +264,7 @@ public: /// /// \param timePoints The definition of the loop. Can be any time points within the sound's length /// - /// \see getLoopPoints + /// \see `getLoopPoints` /// //////////////////////////////////////////////////////////// void setLoopPoints(TimeSpan timePoints); @@ -278,7 +278,7 @@ protected: /// /// \param data Chunk of data to fill /// - /// \return True to continue playback, false to stop + /// \return `true` to continue playback, `false` to stop /// //////////////////////////////////////////////////////////// [[nodiscard]] bool onGetData(Chunk& data) override; @@ -294,7 +294,7 @@ protected: //////////////////////////////////////////////////////////// /// \brief Change the current playing position in the stream source to the loop offset /// - /// This is called by the underlying SoundStream whenever it needs us to reset + /// This is called by the underlying `SoundStream` whenever it needs us to reset /// the seek position for a loop. We then determine whether we are looping on a /// loop point or the end-of-file, perform the seek, and return the new position. /// @@ -305,7 +305,7 @@ protected: private: //////////////////////////////////////////////////////////// - /// \brief Helper to convert an sf::Time to a sample position + /// \brief Helper to convert an `sf::Time` to a sample position /// /// \param position Time to convert to samples /// @@ -315,7 +315,7 @@ private: [[nodiscard]] std::uint64_t timeToSamples(Time position) const; //////////////////////////////////////////////////////////// - /// \brief Helper to convert a sample position to an sf::Time + /// \brief Helper to convert a sample position to an `sf::Time` /// /// \param samples Sample count to convert to Time /// @@ -345,16 +345,16 @@ private: /// you avoid saturating the memory and have almost no loading delay. /// This implies that the underlying resource (file, stream or /// memory buffer) must remain valid for the lifetime of the -/// sf::Music object. +/// `sf::Music` object. /// -/// Apart from that, a sf::Music has almost the same features as -/// the sf::SoundBuffer / sf::Sound pair: you can play/pause/stop +/// Apart from that, a `sf::Music` has almost the same features as +/// the `sf::SoundBuffer` / `sf::Sound` pair: you can play/pause/stop /// it, request its parameters (channels, sample rate), change /// the way it is played (pitch, volume, 3D position, ...), etc. /// /// As a sound stream, a music is played in its own thread in order /// not to block the rest of the program. This means that you can -/// leave the music alone after calling play(), it will manage itself +/// leave the music alone after calling `play()`, it will manage itself /// very well. /// /// Usage example: @@ -372,6 +372,6 @@ private: /// music.play(); /// \endcode /// -/// \see sf::Sound, sf::SoundStream +/// \see `sf::Sound`, `sf::SoundStream` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Audio/OutputSoundFile.hpp b/include/SFML/Audio/OutputSoundFile.hpp index 2d76830a5..43025763f 100644 --- a/include/SFML/Audio/OutputSoundFile.hpp +++ b/include/SFML/Audio/OutputSoundFile.hpp @@ -85,7 +85,7 @@ public: /// \param channelCount Number of channels in the sound /// \param channelMap Map of position in sample frame to sound channel /// - /// \return True if the file was successfully opened + /// \return `true` if the file was successfully opened /// //////////////////////////////////////////////////////////// [[nodiscard]] bool openFromFile(const std::filesystem::path& filename, @@ -123,7 +123,7 @@ private: /// \ingroup audio /// /// This class encodes audio samples to a sound file. It is -/// used internally by higher-level classes such as sf::SoundBuffer, +/// used internally by higher-level classes such as `sf::SoundBuffer`, /// but can also be useful if you want to create audio files from /// custom data sources, like generated audio samples. /// @@ -142,6 +142,6 @@ private: /// } /// \endcode /// -/// \see sf::SoundFileWriter, sf::InputSoundFile +/// \see `sf::SoundFileWriter`, `sf::InputSoundFile` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Audio/PlaybackDevice.hpp b/include/SFML/Audio/PlaybackDevice.hpp index 19eb307ec..c2e246c90 100644 --- a/include/SFML/Audio/PlaybackDevice.hpp +++ b/include/SFML/Audio/PlaybackDevice.hpp @@ -83,7 +83,7 @@ namespace sf::PlaybackDevice /// \brief Set the audio playback device /// /// This function sets the audio playback device to the device -/// with the given \a name. It can be called on the fly (i.e: +/// with the given \a `name`. It can be called on the fly (i.e: /// while sounds are playing). /// /// If there are sounds playing when the audio playback @@ -92,9 +92,9 @@ namespace sf::PlaybackDevice /// /// \param name The name of the audio playback device /// -/// \return True, if it was able to set the requested device +/// \return `true`, if it was able to set the requested device /// -/// \see getAvailableDevices, getDefaultDevice +/// \see `getAvailableDevices`, `getDefaultDevice` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_AUDIO_API bool setDevice(const std::string& name); diff --git a/include/SFML/Audio/Sound.hpp b/include/SFML/Audio/Sound.hpp index 80b0b683e..3deab037d 100644 --- a/include/SFML/Audio/Sound.hpp +++ b/include/SFML/Audio/Sound.hpp @@ -84,7 +84,7 @@ public: /// This function uses its own thread so that it doesn't block /// the rest of the program while the sound is played. /// - /// \see pause, stop + /// \see `pause`, `stop` /// //////////////////////////////////////////////////////////// void play() override; @@ -95,7 +95,7 @@ public: /// This function pauses the sound if it was playing, /// otherwise (sound already paused or stopped) it has no effect. /// - /// \see play, stop + /// \see `play`, `stop` /// //////////////////////////////////////////////////////////// void pause() override; @@ -105,9 +105,9 @@ public: /// /// This function stops the sound if it was playing or paused, /// and does nothing if it was already stopped. - /// It also resets the playing position (unlike pause()). + /// It also resets the playing position (unlike `pause()`). /// - /// \see play, pause + /// \see `play`, `pause` /// //////////////////////////////////////////////////////////// void stop() override; @@ -116,12 +116,12 @@ public: /// \brief Set the source buffer containing the audio data to play /// /// It is important to note that the sound buffer is not copied, - /// thus the sf::SoundBuffer instance must remain alive as long + /// thus the `sf::SoundBuffer` instance must remain alive as long /// as it is attached to the sound. /// /// \param buffer Sound buffer to attach to the sound /// - /// \see getBuffer + /// \see `getBuffer` /// //////////////////////////////////////////////////////////// void setBuffer(const SoundBuffer& buffer); @@ -137,12 +137,12 @@ public: /// /// If set, the sound will restart from beginning after /// reaching the end and so on, until it is stopped or - /// setLooping(false) is called. - /// The default looping state for sound is false. + /// `setLooping(false)` is called. + /// The default looping state for sound is `false`. /// - /// \param loop True to play in loop, false to play once + /// \param loop `true` to play in loop, `false` to play once /// - /// \see isLooping + /// \see `isLooping` /// //////////////////////////////////////////////////////////// void setLooping(bool loop); @@ -157,7 +157,7 @@ public: /// /// \param timeOffset New playing position, from the beginning of the sound /// - /// \see getPlayingOffset + /// \see `getPlayingOffset` /// //////////////////////////////////////////////////////////// void setPlayingOffset(Time timeOffset); @@ -184,9 +184,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Tell whether or not the sound is in loop mode /// - /// \return True if the sound is looping, false otherwise + /// \return `true` if the sound is looping, `false` otherwise /// - /// \see setLooping + /// \see `setLooping` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isLooping() const; @@ -196,7 +196,7 @@ public: /// /// \return Current playing position, from the beginning of the sound /// - /// \see setPlayingOffset + /// \see `setPlayingOffset` /// //////////////////////////////////////////////////////////// [[nodiscard]] Time getPlayingOffset() const; @@ -253,21 +253,21 @@ private: /// \class sf::Sound /// \ingroup audio /// -/// sf::Sound is the class to use to play sounds. +/// `sf::Sound` is the class to use to play sounds. /// It provides: /// \li Control (play, pause, stop) /// \li Ability to modify output parameters in real-time (pitch, volume, ...) /// \li 3D spatial features (position, attenuation, ...). /// -/// sf::Sound is perfect for playing short sounds that can +/// `sf::Sound` is perfect for playing short sounds that can /// fit in memory and require no latency, like foot steps or /// gun shots. For longer sounds, like background musics -/// or long speeches, rather see sf::Music (which is based +/// or long speeches, rather see `sf::Music` (which is based /// on streaming). /// /// In order to work, a sound must be given a buffer of audio -/// data to play. Audio data (samples) is stored in sf::SoundBuffer, -/// and attached to a sound when it is created or with the setBuffer() function. +/// data to play. Audio data (samples) is stored in `sf::SoundBuffer,` +/// and attached to a sound when it is created or with the `setBuffer()` function. /// The buffer object attached to a sound must remain alive /// as long as the sound uses it. Note that multiple sounds /// can use the same sound buffer at the same time. @@ -279,6 +279,6 @@ private: /// sound.play(); /// \endcode /// -/// \see sf::SoundBuffer, sf::Music +/// \see `sf::SoundBuffer`, `sf::Music` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Audio/SoundBuffer.hpp b/include/SFML/Audio/SoundBuffer.hpp index e651d04ff..870a1b5aa 100644 --- a/include/SFML/Audio/SoundBuffer.hpp +++ b/include/SFML/Audio/SoundBuffer.hpp @@ -74,14 +74,14 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the sound buffer from a file /// - /// See the documentation of sf::InputSoundFile for the list + /// See the documentation of `sf::InputSoundFile` for the list /// of supported formats. /// /// \param filename Path of the sound file to load /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromMemory, loadFromStream, loadFromSamples, saveToFile + /// \see `loadFromMemory`, `loadFromStream`, `loadFromSamples`, `saveToFile` /// //////////////////////////////////////////////////////////// SoundBuffer(const std::filesystem::path& filename); @@ -89,7 +89,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the sound buffer from a file in memory /// - /// See the documentation of sf::InputSoundFile for the list + /// See the documentation of `sf::InputSoundFile` for the list /// of supported formats. /// /// \param data Pointer to the file data in memory @@ -97,7 +97,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromStream, loadFromSamples + /// \see `loadFromFile`, `loadFromStream`, `loadFromSamples` /// //////////////////////////////////////////////////////////// SoundBuffer(const void* data, std::size_t sizeInBytes); @@ -105,14 +105,14 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the sound buffer from a custom stream /// - /// See the documentation of sf::InputSoundFile for the list + /// See the documentation of `sf::InputSoundFile` for the list /// of supported formats. /// /// \param stream Source stream to read from /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromSamples + /// \see `loadFromFile`, `loadFromMemory`, `loadFromSamples` /// //////////////////////////////////////////////////////////// SoundBuffer(InputStream& stream); @@ -130,7 +130,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, saveToFile + /// \see `loadFromFile`, `loadFromMemory`, `saveToFile` /// //////////////////////////////////////////////////////////// SoundBuffer(const std::int16_t* samples, @@ -148,14 +148,14 @@ public: //////////////////////////////////////////////////////////// /// \brief Load the sound buffer from a file /// - /// See the documentation of sf::InputSoundFile for the list + /// See the documentation of `sf::InputSoundFile` for the list /// of supported formats. /// /// \param filename Path of the sound file to load /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromMemory, loadFromStream, loadFromSamples, saveToFile + /// \see `loadFromMemory`, `loadFromStream`, `loadFromSamples`, `saveToFile` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromFile(const std::filesystem::path& filename); @@ -163,15 +163,15 @@ public: //////////////////////////////////////////////////////////// /// \brief Load the sound buffer from a file in memory /// - /// See the documentation of sf::InputSoundFile for the list + /// See the documentation of `sf::InputSoundFile` for the list /// of supported formats. /// /// \param data Pointer to the file data in memory /// \param sizeInBytes Size of the data to load, in bytes /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromFile, loadFromStream, loadFromSamples + /// \see `loadFromFile`, `loadFromStream`, `loadFromSamples` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromMemory(const void* data, std::size_t sizeInBytes); @@ -179,14 +179,14 @@ public: //////////////////////////////////////////////////////////// /// \brief Load the sound buffer from a custom stream /// - /// See the documentation of sf::InputSoundFile for the list + /// See the documentation of `sf::InputSoundFile` for the list /// of supported formats. /// /// \param stream Source stream to read from /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromFile, loadFromMemory, loadFromSamples + /// \see `loadFromFile`, `loadFromMemory`, `loadFromSamples` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromStream(InputStream& stream); @@ -202,9 +202,9 @@ public: /// \param sampleRate Sample rate (number of samples to play per second) /// \param channelMap Map of position in sample frame to sound channel /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromFile, loadFromMemory, saveToFile + /// \see `loadFromFile`, `loadFromMemory`, `saveToFile` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromSamples(const std::int16_t* samples, @@ -216,12 +216,12 @@ public: //////////////////////////////////////////////////////////// /// \brief Save the sound buffer to an audio file /// - /// See the documentation of sf::OutputSoundFile for the list + /// See the documentation of `sf::OutputSoundFile` for the list /// of supported formats. /// /// \param filename Path of the sound file to write /// - /// \return True if saving succeeded, false if it failed + /// \return `true` if saving succeeded, `false` if it failed /// //////////////////////////////////////////////////////////// [[nodiscard]] bool saveToFile(const std::filesystem::path& filename) const; @@ -231,11 +231,11 @@ public: /// /// The format of the returned samples is 16 bit signed integer. /// The total number of samples in this array is given by the - /// getSampleCount() function. + /// `getSampleCount()` function. /// /// \return Read-only pointer to the array of sound samples /// - /// \see getSampleCount + /// \see `getSampleCount` /// //////////////////////////////////////////////////////////// [[nodiscard]] const std::int16_t* getSamples() const; @@ -243,12 +243,12 @@ public: //////////////////////////////////////////////////////////// /// \brief Get the number of samples stored in the buffer /// - /// The array of samples can be accessed with the getSamples() + /// The array of samples can be accessed with the `getSamples()` /// function. /// /// \return Number of samples /// - /// \see getSamples + /// \see `getSamples` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::uint64_t getSampleCount() const; @@ -262,7 +262,7 @@ public: /// /// \return Sample rate (number of samples per second) /// - /// \see getChannelCount, getChannelmap, getDuration + /// \see `getChannelCount`, `getChannelMap`, `getDuration` /// //////////////////////////////////////////////////////////// [[nodiscard]] unsigned int getSampleRate() const; @@ -275,7 +275,7 @@ public: /// /// \return Number of channels /// - /// \see getSampleRate, getChannelmap, getDuration + /// \see `getSampleRate`, `getChannelMap`, `getDuration` /// //////////////////////////////////////////////////////////// [[nodiscard]] unsigned int getChannelCount() const; @@ -284,11 +284,11 @@ public: /// \brief Get the map of position in sample frame to sound channel /// /// This is used to map a sample in the sample stream to a - /// position during spatialisation. + /// position during spatialization. /// /// \return Map of position in sample frame to sound channel /// - /// \see getSampleRate, getChannelCount, getDuration + /// \see `getSampleRate`, `getChannelCount`, `getDuration` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::vector getChannelMap() const; @@ -298,7 +298,7 @@ public: /// /// \return Sound duration /// - /// \see getSampleRate, getChannelCount, getChannelmap + /// \see `getSampleRate`, `getChannelCount`, `getChannelMap` /// //////////////////////////////////////////////////////////// [[nodiscard]] Time getDuration() const; @@ -321,7 +321,7 @@ private: /// /// \param file Sound file providing access to the new loaded sound /// - /// \return True on successful initialization, false on failure + /// \return `true` on successful initialization, `false` on failure /// //////////////////////////////////////////////////////////// [[nodiscard]] bool initialize(InputSoundFile& file); @@ -333,7 +333,7 @@ private: /// \param sampleRate Sample rate (number of samples per second) /// \param channelMap Map of position in sample frame to sound channel /// - /// \return True on success, false if any error happened + /// \return `true` on success, `false` if any error happened /// //////////////////////////////////////////////////////////// [[nodiscard]] bool update(unsigned int channelCount, unsigned int sampleRate, const std::vector& channelMap); @@ -382,30 +382,30 @@ private: /// The sound is then reconstituted by playing these samples at /// a high rate (for example, 44100 samples per second is the /// standard rate used for playing CDs). In short, audio samples -/// are like texture pixels, and a sf::SoundBuffer is similar to -/// a sf::Texture. +/// are like texture pixels, and a `sf::SoundBuffer` is similar to +/// a `sf::Texture`. /// /// A sound buffer can be loaded from a file, from memory, from -/// a custom stream (see sf::InputStream) or directly from an array +/// a custom stream (see `sf::InputStream`) or directly from an array /// of samples. It can also be saved back to a file. /// /// Sound buffers alone are not very useful: they hold the audio data -/// but cannot be played. To do so, you need to use the sf::Sound class, +/// but cannot be played. To do so, you need to use the `sf::Sound` class, /// which provides functions to play/pause/stop the sound as well as /// changing the way it is outputted (volume, pitch, 3D position, ...). /// This separation allows more flexibility and better performances: -/// indeed a sf::SoundBuffer is a heavy resource, and any operation on it +/// indeed a `sf::SoundBuffer` is a heavy resource, and any operation on it /// is slow (often too slow for real-time applications). On the other -/// side, a sf::Sound is a lightweight object, which can use the audio data +/// side, a `sf::Sound` is a lightweight object, which can use the audio data /// of a sound buffer and change the way it is played without actually /// modifying that data. Note that it is also possible to bind -/// several sf::Sound instances to the same sf::SoundBuffer. +/// several `sf::Sound` instances to the same `sf::SoundBuffer`. /// -/// It is important to note that the sf::Sound instance doesn't +/// It is important to note that the `sf::Sound` instance doesn't /// copy the buffer that it uses, it only keeps a reference to it. -/// Thus, a sf::SoundBuffer must not be destructed while it is -/// used by a sf::Sound (i.e. never write a function that -/// uses a local sf::SoundBuffer instance for loading a sound). +/// Thus, a `sf::SoundBuffer` must not be destructed while it is +/// used by a `sf::Sound` (i.e. never write a function that +/// uses a local `sf::SoundBuffer` instance for loading a sound). /// /// Usage example: /// \code @@ -426,6 +426,6 @@ private: /// sound2.play(); /// \endcode /// -/// \see sf::Sound, sf::SoundBufferRecorder +/// \see `sf::Sound`, `sf::SoundBufferRecorder` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Audio/SoundBufferRecorder.hpp b/include/SFML/Audio/SoundBufferRecorder.hpp index 710226999..116ea800e 100644 --- a/include/SFML/Audio/SoundBufferRecorder.hpp +++ b/include/SFML/Audio/SoundBufferRecorder.hpp @@ -71,7 +71,7 @@ protected: //////////////////////////////////////////////////////////// /// \brief Start capturing audio data /// - /// \return True to start the capture, or false to abort it + /// \return `true` to start the capture, or `false` to abort it /// //////////////////////////////////////////////////////////// [[nodiscard]] bool onStart() override; @@ -82,7 +82,7 @@ protected: /// \param samples Pointer to the new chunk of recorded samples /// \param sampleCount Number of samples pointed by \a samples /// - /// \return True to continue the capture, or false to stop it + /// \return `true` to continue the capture, or `false` to stop it /// //////////////////////////////////////////////////////////// [[nodiscard]] bool onProcessSamples(const std::int16_t* samples, std::size_t sampleCount) override; @@ -108,16 +108,16 @@ private: /// \class sf::SoundBufferRecorder /// \ingroup audio /// -/// sf::SoundBufferRecorder allows to access a recorded sound -/// through a sf::SoundBuffer, so that it can be played, saved +/// `sf::SoundBufferRecorder` allows to access a recorded sound +/// through a `sf::SoundBuffer`, so that it can be played, saved /// to a file, etc. /// -/// It has the same simple interface as its base class (start(), stop()) +/// It has the same simple interface as its base class (`start()`, `stop()`) /// and adds a function to retrieve the recorded sound buffer -/// (getBuffer()). +/// (`getBuffer()`). /// -/// As usual, don't forget to call the isAvailable() function -/// before using this class (see sf::SoundRecorder for more details +/// As usual, don't forget to call the `isAvailable()` function +/// before using this class (see `sf::SoundRecorder` for more details /// about this). /// /// Usage example: @@ -144,6 +144,6 @@ private: /// } /// \endcode /// -/// \see sf::SoundRecorder +/// \see `sf::SoundRecorder` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Audio/SoundChannel.hpp b/include/SFML/Audio/SoundChannel.hpp index de8d44630..4418d007e 100644 --- a/include/SFML/Audio/SoundChannel.hpp +++ b/include/SFML/Audio/SoundChannel.hpp @@ -33,9 +33,9 @@ namespace sf /// In multi-channel audio, each sound channel can be /// assigned a position. The position of the channel is /// used to determine where to place a sound when it -/// is spatialised. Assigning an incorrect sound channel +/// is spatialized. Assigning an incorrect sound channel /// will result in multi-channel audio being positioned -/// incorrectly when using spatialisation. +/// incorrectly when using spatialization. /// //////////////////////////////////////////////////////////// enum class SoundChannel diff --git a/include/SFML/Audio/SoundFileFactory.hpp b/include/SFML/Audio/SoundFileFactory.hpp index 77a0d2ce2..227b315a4 100644 --- a/include/SFML/Audio/SoundFileFactory.hpp +++ b/include/SFML/Audio/SoundFileFactory.hpp @@ -52,7 +52,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Register a new reader /// - /// \see unregisterReader + /// \see `unregisterReader` /// //////////////////////////////////////////////////////////// template @@ -61,7 +61,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Unregister a reader /// - /// \see registerReader + /// \see `registerReader` /// //////////////////////////////////////////////////////////// template @@ -77,7 +77,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Register a new writer /// - /// \see unregisterWriter + /// \see `unregisterWriter` /// //////////////////////////////////////////////////////////// template @@ -86,7 +86,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Unregister a writer /// - /// \see registerWriter + /// \see `registerWriter` /// //////////////////////////////////////////////////////////// template @@ -106,7 +106,7 @@ public: /// /// \return A new sound file reader that can read the given file, or null if no reader can handle it /// - /// \see createReaderFromMemory, createReaderFromStream + /// \see `createReaderFromMemory`, `createReaderFromStream` /// //////////////////////////////////////////////////////////// [[nodiscard]] static std::unique_ptr createReaderFromFilename(const std::filesystem::path& filename); @@ -119,7 +119,7 @@ public: /// /// \return A new sound file codec that can read the given file, or null if no codec can handle it /// - /// \see createReaderFromFilename, createReaderFromStream + /// \see `createReaderFromFilename`, `createReaderFromStream` /// //////////////////////////////////////////////////////////// [[nodiscard]] static std::unique_ptr createReaderFromMemory(const void* data, std::size_t sizeInBytes); @@ -131,7 +131,7 @@ public: /// /// \return A new sound file codec that can read the given file, or null if no codec can handle it /// - /// \see createReaderFromFilename, createReaderFromMemory + /// \see `createReaderFromFilename`, `createReaderFromMemory` /// //////////////////////////////////////////////////////////// [[nodiscard]] static std::unique_ptr createReaderFromStream(InputStream& stream); @@ -178,12 +178,12 @@ private: /// This class is where all the sound file readers and writers are /// registered. You should normally only need to use its registration /// and unregistration functions; readers/writers creation and manipulation -/// are wrapped into the higher-level classes sf::InputSoundFile and -/// sf::OutputSoundFile. +/// are wrapped into the higher-level classes `sf::InputSoundFile` and +/// `sf::OutputSoundFile`. /// -/// To register a new reader (writer) use the sf::SoundFileFactory::registerReader -/// (registerWriter) static function. You don't have to call the unregisterReader -/// (unregisterWriter) function, unless you want to unregister a format before your +/// To register a new reader (writer) use the `sf::SoundFileFactory::registerReader` +/// (`registerWriter`) static function. You don't have to call the `unregisterReader` +/// (`unregisterWriter`) function, unless you want to unregister a format before your /// application ends (typically, when a plugin is unloaded). /// /// Usage example: @@ -195,6 +195,6 @@ private: /// assert(sf::SoundFileFactory::isWriterRegistered()); /// \endcode /// -/// \see sf::InputSoundFile, sf::OutputSoundFile, sf::SoundFileReader, sf::SoundFileWriter +/// \see `sf::InputSoundFile`, `sf::OutputSoundFile`, `sf::SoundFileReader`, `sf::SoundFileWriter` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Audio/SoundFileReader.hpp b/include/SFML/Audio/SoundFileReader.hpp index 11538838f..5ce6ec839 100644 --- a/include/SFML/Audio/SoundFileReader.hpp +++ b/include/SFML/Audio/SoundFileReader.hpp @@ -70,7 +70,7 @@ public: /// \brief Open a sound file for reading /// /// The provided stream reference is valid as long as the - /// SoundFileReader is alive, so it is safe to use/store it + /// `SoundFileReader` is alive, so it is safe to use/store it /// during the whole lifetime of the reader. /// /// \param stream Source stream to read from @@ -122,7 +122,7 @@ public: /// as well as providing a static check function; the latter is used by /// SFML to find a suitable writer for a given input file. /// -/// To register a new reader, use the sf::SoundFileFactory::registerReader +/// To register a new reader, use the `sf::SoundFileFactory::registerReader` /// template function. /// /// Usage example: @@ -162,6 +162,6 @@ public: /// sf::SoundFileFactory::registerReader(); /// \endcode /// -/// \see sf::InputSoundFile, sf::SoundFileFactory, sf::SoundFileWriter +/// \see `sf::InputSoundFile`, `sf::SoundFileFactory`, `sf::SoundFileWriter` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Audio/SoundFileWriter.hpp b/include/SFML/Audio/SoundFileWriter.hpp index 5d66ac109..1a3629c34 100644 --- a/include/SFML/Audio/SoundFileWriter.hpp +++ b/include/SFML/Audio/SoundFileWriter.hpp @@ -60,7 +60,7 @@ public: /// \param channelCount Number of channels of the sound /// \param channelMap Map of position in sample frame to sound channel /// - /// \return True if the file was successfully opened + /// \return `true` if the file was successfully opened /// //////////////////////////////////////////////////////////// [[nodiscard]] virtual bool open(const std::filesystem::path& filename, @@ -93,7 +93,7 @@ public: /// as well as providing a static check function; the latter is used by /// SFML to find a suitable writer for a given filename. /// -/// To register a new writer, use the sf::SoundFileFactory::registerWriter +/// To register a new writer, use the `sf::SoundFileFactory::registerWriter` /// template function. /// /// Usage example: @@ -125,6 +125,6 @@ public: /// sf::SoundFileFactory::registerWriter(); /// \endcode /// -/// \see sf::OutputSoundFile, sf::SoundFileFactory, sf::SoundFileReader +/// \see `sf::OutputSoundFile`, `sf::SoundFileFactory`, `sf::SoundFileReader` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Audio/SoundRecorder.hpp b/include/SFML/Audio/SoundRecorder.hpp index 7d5d8c08c..6e99a551b 100644 --- a/include/SFML/Audio/SoundRecorder.hpp +++ b/include/SFML/Audio/SoundRecorder.hpp @@ -57,23 +57,23 @@ public: //////////////////////////////////////////////////////////// /// \brief Start the capture /// - /// The \a sampleRate parameter defines the number of audio samples + /// The \a `sampleRate` parameter defines the number of audio samples /// captured per second. The higher, the better the quality /// (for example, 44100 samples/sec is CD quality). /// This function uses its own thread so that it doesn't block /// the rest of the program while the capture runs. /// Please note that only one capture can happen at the same time. /// You can select which capture device will be used by passing - /// the name to the setDevice() method. If none was selected + /// the name to the `setDevice()` method. If none was selected /// before, the default capture device will be used. You can get a /// list of the names of all available capture devices by calling - /// getAvailableDevices(). + /// `getAvailableDevices()`. /// /// \param sampleRate Desired capture rate, in number of samples per second /// - /// \return True, if start of capture was successful + /// \return `true`, if start of capture was successful /// - /// \see stop, getAvailableDevices + /// \see `stop`, `getAvailableDevices` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool start(unsigned int sampleRate = 44100); @@ -81,7 +81,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Stop the capture /// - /// \see start + /// \see `start` /// //////////////////////////////////////////////////////////// void stop(); @@ -125,15 +125,15 @@ public: /// \brief Set the audio capture device /// /// This function sets the audio capture device to the device - /// with the given \a name. It can be called on the fly (i.e: + /// with the given \a `name`. It can be called on the fly (i.e: /// while recording). If you do so while recording and /// opening the device fails, it stops the recording. /// /// \param name The name of the audio capture device /// - /// \return True, if it was able to set the requested device + /// \return `true`, if it was able to set the requested device /// - /// \see getAvailableDevices, getDefaultDevice + /// \see `getAvailableDevices`, `getDefaultDevice` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool setDevice(const std::string& name); @@ -156,7 +156,7 @@ public: /// \param channelCount Number of channels. Currently only /// mono (1) and stereo (2) are supported. /// - /// \see getChannelCount + /// \see `getChannelCount` /// //////////////////////////////////////////////////////////// void setChannelCount(unsigned int channelCount); @@ -169,7 +169,7 @@ public: /// /// \return Number of channels /// - /// \see setChannelCount + /// \see `setChannelCount` /// //////////////////////////////////////////////////////////// [[nodiscard]] unsigned int getChannelCount() const; @@ -178,7 +178,7 @@ public: /// \brief Get the map of position in sample frame to sound channel /// /// This is used to map a sample in the sample stream to a - /// position during spatialisation. + /// position during spatialization. /// /// \return Map of position in sample frame to sound channel /// @@ -189,11 +189,11 @@ public: /// \brief Check if the system supports audio capture /// /// This function should always be called before using - /// the audio capture features. If it returns false, then - /// any attempt to use sf::SoundRecorder or one of its derived + /// the audio capture features. If it returns `false`, then + /// any attempt to use `sf::SoundRecorder` or one of its derived /// classes will fail. /// - /// \return True if audio capture is supported, false otherwise + /// \return `true` if audio capture is supported, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] static bool isAvailable(); @@ -215,7 +215,7 @@ protected: /// starts. If not, this function can be ignored; the default /// implementation does nothing. /// - /// \return True to start the capture, or false to abort it + /// \return `true` to start the capture, or `false` to abort it /// //////////////////////////////////////////////////////////// virtual bool onStart(); @@ -229,9 +229,9 @@ protected: /// it over the network, etc.). /// /// \param samples Pointer to the new chunk of recorded samples - /// \param sampleCount Number of samples pointed by \a samples + /// \param sampleCount Number of samples pointed by \a `samples` /// - /// \return True to continue the capture, or false to stop it + /// \return `true` to continue the capture, or `false` to stop it /// //////////////////////////////////////////////////////////// [[nodiscard]] virtual bool onProcessSamples(const std::int16_t* samples, std::size_t sampleCount) = 0; @@ -262,24 +262,24 @@ private: /// \class sf::SoundRecorder /// \ingroup audio /// -/// sf::SoundBuffer provides a simple interface to access +/// `sf::SoundBuffer` provides a simple interface to access /// the audio recording capabilities of the computer /// (the microphone). As an abstract base class, it only cares /// about capturing sound samples, the task of making something /// useful with them is left to the derived class. Note that /// SFML provides a built-in specialization for saving the -/// captured data to a sound buffer (see sf::SoundBufferRecorder). +/// captured data to a sound buffer (see `sf::SoundBufferRecorder`). /// /// A derived class has only one virtual function to override: -/// \li onProcessSamples provides the new chunks of audio samples while the capture happens +/// \li `onProcessSamples` provides the new chunks of audio samples while the capture happens /// /// Moreover, two additional virtual functions can be overridden /// as well if necessary: -/// \li onStart is called before the capture happens, to perform custom initializations -/// \li onStop is called after the capture ends, to perform custom cleanup +/// \li `onStart` is called before the capture happens, to perform custom initializations +/// \li `onStop` is called after the capture ends, to perform custom cleanup /// /// A derived class can also control the frequency of the onProcessSamples -/// calls, with the setProcessingInterval protected function. The default +/// calls, with the `setProcessingInterval` protected function. The default /// interval is chosen so that recording thread doesn't consume too much /// CPU, but it can be changed to a smaller value if you need to process /// the recorded data in real time, for example. @@ -287,13 +287,13 @@ private: /// The audio capture feature may not be supported or activated /// on every platform, thus it is recommended to check its /// availability with the isAvailable() function. If it returns -/// false, then any attempt to use an audio recorder will fail. +/// `false`, then any attempt to use an audio recorder will fail. /// /// If you have multiple sound input devices connected to your -/// computer (for example: microphone, external soundcard, webcam mic, ...) +/// computer (for example: microphone, external sound card, webcam mic, ...) /// you can get a list of all available devices through the -/// getAvailableDevices() function. You can then select a device -/// by calling setDevice() with the appropriate device. Otherwise +/// `getAvailableDevices()` function. You can then select a device +/// by calling `setDevice()` with the appropriate device. Otherwise /// the default capturing device will be used. /// /// By default the recording is in 16-bit mono. Using the @@ -304,12 +304,12 @@ private: /// /// It is important to note that the audio capture happens in a /// separate thread, so that it doesn't block the rest of the -/// program. In particular, the onProcessSamples virtual function -/// (but not onStart and not onStop) will be called +/// program. In particular, the `onProcessSamples` virtual function +/// (but not `onStart` and not `onStop`) will be called /// from this separate thread. It is important to keep this in /// mind, because you may have to take care of synchronization /// issues if you share data between threads. -/// Another thing to bear in mind is that you must call stop() +/// Another thing to bear in mind is that you must call `stop()` /// in the destructor of your derived class, so that the recording /// thread finishes before your object is destroyed. /// @@ -363,6 +363,6 @@ private: /// } /// \endcode /// -/// \see sf::SoundBufferRecorder +/// \see `sf::SoundBufferRecorder` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Audio/SoundSource.hpp b/include/SFML/Audio/SoundSource.hpp index 3c99cf64e..24129e85d 100644 --- a/include/SFML/Audio/SoundSource.hpp +++ b/include/SFML/Audio/SoundSource.hpp @@ -63,9 +63,9 @@ public: /// /// Sounds will play at gain 1 when the listener /// is positioned within the inner angle of the cone. - /// Sounds will play at outerGain when the listener is + /// Sounds will play at `outerGain` when the listener is /// positioned outside the outer angle of the cone. - /// The gain declines linearly from 1 to outerGain as the + /// The gain declines linearly from 1 to `outerGain` as the /// listener moves from the inner angle to the outer angle. /// //////////////////////////////////////////////////////////// @@ -110,7 +110,7 @@ public: /// /// It is important to note that the channel count of the /// audio engine currently sourcing data from this sound - /// will always be provided in frameChannelCount. This can + /// will always be provided in `frameChannelCount`. This can /// be different from the channel count of the sound source /// so make sure to size necessary processing buffers /// according to the engine channel count and not the sound @@ -131,7 +131,7 @@ public: /// /// If the audio engine determines that no audio data is /// available from the data source, the input data frames - /// pointer is set to nullptr and the input frame count is + /// pointer is set to `nullptr` and the input frame count is /// set to 0. In this case it is up to the function to /// decide how to handle the situation. For specific effects /// e.g. Echo/Delay buffered data might still be able to be @@ -143,9 +143,9 @@ public: /// engine runs on an internal thread of its own, make sure /// access to shared data is synchronized appropriately. /// - /// Because this function is stored by the SoundSource + /// Because this function is stored by the `SoundSource` /// object it will be able to be called as long as the - /// SoundSource object hasn't yet been destroyed. Make sure + /// `SoundSource` object hasn't yet been destroyed. Make sure /// that any data this function references outlives the /// SoundSource object otherwise use-after-free errors will /// occur. @@ -189,7 +189,7 @@ public: /// /// \param pitch New pitch to apply to the sound /// - /// \see getPitch + /// \see `getPitch` /// //////////////////////////////////////////////////////////// void setPitch(float pitch); @@ -204,7 +204,7 @@ public: /// /// \param pan New pan to apply to the sound [-1, +1] /// - /// \see getPan + /// \see `getPan` /// //////////////////////////////////////////////////////////// void setPan(float pan); @@ -217,7 +217,7 @@ public: /// /// \param volume Volume of the sound /// - /// \see getVolume + /// \see `getVolume` /// //////////////////////////////////////////////////////////// void setVolume(float volume); @@ -230,9 +230,9 @@ public: /// 3D space and exhibiting various physical phenomena such as /// directional attenuation and doppler shift. /// - /// \param enabled True to enable spatialization, false to disable + /// \param enabled `true` to enable spatialization, `false` to disable /// - /// \see isSpatializationEnabled + /// \see `isSpatializationEnabled` /// //////////////////////////////////////////////////////////// void setSpatializationEnabled(bool enabled); @@ -246,7 +246,7 @@ public: /// /// \param position Position of the sound in the scene /// - /// \see getPosition + /// \see `getPosition` /// //////////////////////////////////////////////////////////// void setPosition(const Vector3f& position); @@ -261,7 +261,7 @@ public: /// /// \param direction Direction of the sound in the scene /// - /// \see getDirection + /// \see `getDirection` /// //////////////////////////////////////////////////////////// void setDirection(const Vector3f& direction); @@ -270,11 +270,11 @@ public: /// \brief Set the cone properties of the sound in the audio scene /// /// The cone defines how directional attenuation is applied. - /// The default cone of a sound is {2 * PI, 2 * PI, 1}. + /// The default cone of a sound is (2 * PI, 2 * PI, 1). /// /// \param cone Cone properties of the sound in the scene /// - /// \see getCone + /// \see `getCone` /// //////////////////////////////////////////////////////////// void setCone(const Cone& cone); @@ -289,7 +289,7 @@ public: /// /// \param velocity Velocity of the sound in the scene /// - /// \see getVelocity + /// \see `getVelocity` /// //////////////////////////////////////////////////////////// void setVelocity(const Vector3f& velocity); @@ -302,7 +302,7 @@ public: /// /// \param factor New doppler factor to apply to the sound /// - /// \see getDopplerFactor + /// \see `getDopplerFactor` /// //////////////////////////////////////////////////////////// void setDopplerFactor(float factor); @@ -319,7 +319,7 @@ public: /// /// \param factor New directional attenuation factor to apply to the sound /// - /// \see getDirectionalAttenuationFactor + /// \see `getDirectionalAttenuationFactor` /// //////////////////////////////////////////////////////////// void setDirectionalAttenuationFactor(float factor); @@ -331,11 +331,11 @@ public: /// be played the same way regardless of the position of the listener. /// This can be useful for non-spatialized sounds, sounds that are /// produced by the listener, or sounds attached to it. - /// The default value is false (position is absolute). + /// The default value is `false` (position is absolute). /// - /// \param relative True to set the position relative, false to set it absolute + /// \param relative `true` to set the position relative, `false` to set it absolute /// - /// \see isRelativeToListener + /// \see `isRelativeToListener` /// //////////////////////////////////////////////////////////// void setRelativeToListener(bool relative); @@ -352,7 +352,7 @@ public: /// /// \param distance New minimum distance of the sound /// - /// \see getMinDistance, setAttenuation + /// \see `getMinDistance`, `setAttenuation` /// //////////////////////////////////////////////////////////// void setMinDistance(float distance); @@ -369,7 +369,7 @@ public: /// /// \param distance New maximum distance of the sound /// - /// \see getMaxDistance, setAttenuation + /// \see `getMaxDistance`, `setAttenuation` /// //////////////////////////////////////////////////////////// void setMaxDistance(float distance); @@ -383,7 +383,7 @@ public: /// /// \param gain New minimum gain of the sound /// - /// \see getMinGain, setAttenuation + /// \see `getMinGain`, `setAttenuation` /// //////////////////////////////////////////////////////////// void setMinGain(float gain); @@ -397,7 +397,7 @@ public: /// /// \param gain New maximum gain of the sound /// - /// \see getMaxGain, setAttenuation + /// \see `getMaxGain`, `setAttenuation` /// //////////////////////////////////////////////////////////// void setMaxGain(float gain); @@ -416,7 +416,7 @@ public: /// /// \param attenuation New attenuation factor of the sound /// - /// \see getAttenuation, setMinDistance + /// \see `getAttenuation`, `setMinDistance` /// //////////////////////////////////////////////////////////// void setAttenuation(float attenuation); @@ -437,7 +437,7 @@ public: /// /// \return Pitch of the sound /// - /// \see setPitch + /// \see `setPitch` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getPitch() const; @@ -447,7 +447,7 @@ public: /// /// \return Pan of the sound /// - /// \see setPan + /// \see `setPan` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getPan() const; @@ -457,7 +457,7 @@ public: /// /// \return Volume of the sound, in the range [0, 100] /// - /// \see setVolume + /// \see `setVolume` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getVolume() const; @@ -465,9 +465,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Tell whether spatialization of the sound is enabled /// - /// \return True if spatialization is enabled, false if it's disabled + /// \return `true` if spatialization is enabled, `false` if it's disabled /// - /// \see setSpatializationEnabled + /// \see `setSpatializationEnabled` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isSpatializationEnabled() const; @@ -477,7 +477,7 @@ public: /// /// \return Position of the sound /// - /// \see setPosition + /// \see `setPosition` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector3f getPosition() const; @@ -487,7 +487,7 @@ public: /// /// \return Direction of the sound /// - /// \see setDirection + /// \see `setDirection` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector3f getDirection() const; @@ -497,7 +497,7 @@ public: /// /// \return Cone properties of the sound /// - /// \see setCone + /// \see `setCone` /// //////////////////////////////////////////////////////////// [[nodiscard]] Cone getCone() const; @@ -507,7 +507,7 @@ public: /// /// \return Velocity of the sound /// - /// \see setVelocity + /// \see `setVelocity` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector3f getVelocity() const; @@ -517,7 +517,7 @@ public: /// /// \return Doppler factor of the sound /// - /// \see setDopplerFactor + /// \see `setDopplerFactor` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getDopplerFactor() const; @@ -527,7 +527,7 @@ public: /// /// \return Directional attenuation factor of the sound /// - /// \see setDirectionalAttenuationFactor + /// \see `setDirectionalAttenuationFactor` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getDirectionalAttenuationFactor() const; @@ -536,9 +536,9 @@ public: /// \brief Tell whether the sound's position is relative to the /// listener or is absolute /// - /// \return True if the position is relative, false if it's absolute + /// \return `true` if the position is relative, `false` if it's absolute /// - /// \see setRelativeToListener + /// \see `setRelativeToListener` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isRelativeToListener() const; @@ -548,7 +548,7 @@ public: /// /// \return Minimum distance of the sound /// - /// \see setMinDistance, getAttenuation + /// \see `setMinDistance`, `getAttenuation` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getMinDistance() const; @@ -558,7 +558,7 @@ public: /// /// \return Maximum distance of the sound /// - /// \see setMaxDistance, getAttenuation + /// \see `setMaxDistance`, `getAttenuation` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getMaxDistance() const; @@ -568,7 +568,7 @@ public: /// /// \return Minimum gain of the sound /// - /// \see setMinGain, getAttenuation + /// \see `setMinGain`, `getAttenuation` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getMinGain() const; @@ -578,7 +578,7 @@ public: /// /// \return Maximum gain of the sound /// - /// \see setMaxGain, getAttenuation + /// \see `setMaxGain`, `getAttenuation` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getMaxGain() const; @@ -588,7 +588,7 @@ public: /// /// \return Attenuation factor of the sound /// - /// \see setAttenuation, getMinDistance + /// \see `setAttenuation`, `getMinDistance` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getAttenuation() const; @@ -610,7 +610,7 @@ public: /// it if it was paused, and restarts it from the beginning if /// it was already playing. /// - /// \see pause, stop + /// \see `pause`, `stop` /// //////////////////////////////////////////////////////////// virtual void play() = 0; @@ -621,7 +621,7 @@ public: /// This function pauses the source if it was playing, /// otherwise (source already paused or stopped) it has no effect. /// - /// \see play, stop + /// \see `play`, `stop` /// //////////////////////////////////////////////////////////// virtual void pause() = 0; @@ -631,9 +631,9 @@ public: /// /// This function stops the source if it was playing or paused, /// and does nothing if it was already stopped. - /// It also resets the playing position (unlike pause()). + /// It also resets the playing position (unlike `pause()`). /// - /// \see play, pause + /// \see `play`, `pause` /// //////////////////////////////////////////////////////////// virtual void stop() = 0; @@ -673,7 +673,7 @@ private: /// \class sf::SoundSource /// \ingroup audio /// -/// sf::SoundSource is not meant to be used directly, it +/// `sf::SoundSource` is not meant to be used directly, it /// only serves as a common base for all audio objects /// that can live in the audio environment. /// @@ -681,6 +681,6 @@ private: /// volume, position, attenuation, etc. All of them can be /// changed at any time with no impact on performances. /// -/// \see sf::Sound, sf::SoundStream +/// \see `sf::Sound`, `sf::SoundStream` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Audio/SoundStream.hpp b/include/SFML/Audio/SoundStream.hpp index f756e61dc..0654b0580 100644 --- a/include/SFML/Audio/SoundStream.hpp +++ b/include/SFML/Audio/SoundStream.hpp @@ -88,7 +88,7 @@ public: /// This function uses its own thread so that it doesn't block /// the rest of the program while the stream is played. /// - /// \see pause, stop + /// \see `pause`, `stop` /// //////////////////////////////////////////////////////////// void play() override; @@ -99,7 +99,7 @@ public: /// This function pauses the stream if it was playing, /// otherwise (stream already paused or stopped) it has no effect. /// - /// \see play, stop + /// \see `play`, `stop` /// //////////////////////////////////////////////////////////// void pause() override; @@ -109,9 +109,9 @@ public: /// /// This function stops the stream if it was playing or paused, /// and does nothing if it was already stopped. - /// It also resets the playing position (unlike pause()). + /// It also resets the playing position (unlike `pause()`). /// - /// \see play, pause + /// \see `play`, `pause` /// //////////////////////////////////////////////////////////// void stop() override; @@ -141,7 +141,7 @@ public: /// \brief Get the map of position in sample frame to sound channel /// /// This is used to map a sample in the sample stream to a - /// position during spatialisation. + /// position during spatialization. /// /// \return Map of position in sample frame to sound channel /// @@ -166,7 +166,7 @@ public: /// /// \param timeOffset New playing position, from the beginning of the stream /// - /// \see getPlayingOffset + /// \see `getPlayingOffset` /// //////////////////////////////////////////////////////////// void setPlayingOffset(Time timeOffset); @@ -176,7 +176,7 @@ public: /// /// \return Current playing position, from the beginning of the stream /// - /// \see setPlayingOffset + /// \see `setPlayingOffset` /// //////////////////////////////////////////////////////////// [[nodiscard]] Time getPlayingOffset() const; @@ -186,12 +186,12 @@ public: /// /// If set, the stream will restart from beginning after /// reaching the end and so on, until it is stopped or - /// setLooping(false) is called. - /// The default looping state for streams is false. + /// `setLooping(false)` is called. + /// The default looping state for streams is `false`. /// - /// \param loop True to play in loop, false to play once + /// \param loop `true` to play in loop, `false` to play once /// - /// \see isLooping + /// \see `isLooping` /// //////////////////////////////////////////////////////////// void setLooping(bool loop); @@ -199,9 +199,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Tell whether or not the stream is in loop mode /// - /// \return True if the stream is looping, false otherwise + /// \return `true` if the stream is looping, `false` otherwise /// - /// \see setLooping + /// \see `setLooping` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isLooping() const; @@ -231,7 +231,7 @@ protected: /// /// This function must be called by derived classes as soon /// as they know the audio settings of the stream to play. - /// Any attempt to manipulate the stream (play(), ...) before + /// Any attempt to manipulate the stream (`play()`, ...) before /// calling this function will fail. /// It can be called multiple times if the settings of the /// audio stream change, but only when the stream is stopped. @@ -250,14 +250,14 @@ protected: /// the audio samples to play. It is called continuously by the /// streaming loop, in a separate thread. /// The source can choose to stop the streaming loop at any time, by - /// returning false to the caller. - /// If you return true (i.e. continue streaming) it is important that + /// returning `false` to the caller. + /// If you return `true` (i.e. continue streaming) it is important that /// the returned array of samples is not empty; this would stop the stream /// due to an internal limitation. /// /// \param data Chunk of data to fill /// - /// \return True to continue playback, false to stop + /// \return `true` to continue playback, `false` to stop /// //////////////////////////////////////////////////////////// [[nodiscard]] virtual bool onGetData(Chunk& data) = 0; @@ -278,7 +278,7 @@ protected: /// /// This function can be overridden by derived classes to /// allow implementation of custom loop points. Otherwise, - /// it just calls onSeek(Time::Zero) and returns 0. + /// it just calls `onSeek(Time::Zero)` and returns 0. /// /// \return The seek position after looping (or `std::nullopt` if there's no loop) /// @@ -308,7 +308,7 @@ private: /// \class sf::SoundStream /// \ingroup audio /// -/// Unlike audio buffers (see sf::SoundBuffer), audio streams +/// Unlike audio buffers (see `sf::SoundBuffer`), audio streams /// are never completely loaded in memory. Instead, the audio /// data is acquired continuously while the stream is playing. /// This behavior allows to play a sound with no loading delay, @@ -319,19 +319,19 @@ private: /// or files that would take a lot of time to be received /// (sounds played over the network). /// -/// sf::SoundStream is a base class that doesn't care about the +/// `sf::SoundStream` is a base class that doesn't care about the /// stream source, which is left to the derived class. SFML provides -/// a built-in specialization for big files (see sf::Music). +/// a built-in specialization for big files (see `sf::Music`). /// No network stream source is provided, but you can write your own /// by combining this class with the network module. /// /// A derived class has to override two virtual functions: -/// \li onGetData fills a new chunk of audio data to be played -/// \li onSeek changes the current playing position in the source +/// \li `onGetData` fills a new chunk of audio data to be played +/// \li `onSeek` changes the current playing position in the source /// /// It is important to note that each SoundStream is played in its /// own separate thread, so that the streaming loop doesn't block the -/// rest of the program. In particular, the OnGetData and OnSeek +/// rest of the program. In particular, the `onGetData` and `onSeek` /// virtual functions may sometimes be called from this separate thread. /// It is important to keep this in mind, because you may have to take /// care of synchronization issues if you share data between threads. @@ -380,6 +380,6 @@ private: /// stream.play(); /// \endcode /// -/// \see sf::Music +/// \see `sf::Music` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/GpuPreference.hpp b/include/SFML/GpuPreference.hpp index 6796261c3..fdb51ae96 100644 --- a/include/SFML/GpuPreference.hpp +++ b/include/SFML/GpuPreference.hpp @@ -51,7 +51,7 @@ /// /// SFML defines a helper macro to easily do this. /// -/// Place SFML_DEFINE_DISCRETE_GPU_PREFERENCE in the +/// Place `SFML_DEFINE_DISCRETE_GPU_PREFERENCE` in the /// global scope of a source file that will be linked into /// the final executable. Typically it is best to place it /// where the main function is also defined. diff --git a/include/SFML/Graphics/BlendMode.hpp b/include/SFML/Graphics/BlendMode.hpp index 16cc5c676..8f92e45f3 100644 --- a/include/SFML/Graphics/BlendMode.hpp +++ b/include/SFML/Graphics/BlendMode.hpp @@ -126,24 +126,24 @@ struct SFML_GRAPHICS_API BlendMode //////////////////////////////////////////////////////////// /// \relates BlendMode -/// \brief Overload of the == operator +/// \brief Overload of the `operator==` /// /// \param left Left operand /// \param right Right operand /// -/// \return True if blending modes are equal, false if they are different +/// \return `true` if blending modes are equal, `false` if they are different /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_GRAPHICS_API bool operator==(const BlendMode& left, const BlendMode& right); //////////////////////////////////////////////////////////// /// \relates BlendMode -/// \brief Overload of the != operator +/// \brief Overload of the `operator!=` /// /// \param left Left operand /// \param right Right operand /// -/// \return True if blending modes are different, false if they are equal +/// \return `true` if blending modes are different, `false` if they are equal /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_GRAPHICS_API bool operator!=(const BlendMode& left, const BlendMode& right); @@ -167,7 +167,7 @@ SFML_GRAPHICS_API extern const BlendMode BlendNone; //!< Overwrite dest with /// \class sf::BlendMode /// \ingroup graphics /// -/// sf::BlendMode is a class that represents a blend mode. A blend +/// `sf::BlendMode` is a class that represents a blend mode. A blend /// mode determines how the colors of an object you draw are /// mixed with the colors that are already in the buffer. /// @@ -191,7 +191,7 @@ SFML_GRAPHICS_API extern const BlendMode BlendNone; //!< Overwrite dest with /// /// The blend factors and equations correspond to their OpenGL equivalents. /// In general, the color of the resulting pixel is calculated according -/// to the following formula (\a src is the color of the source pixel, \a dst +/// to the following formula (\a `src` is the color of the source pixel, \a `dst` /// the color of the destination pixel, the other variables correspond to the /// public members, with the equations being + or - operators): /// \code @@ -211,10 +211,10 @@ SFML_GRAPHICS_API extern const BlendMode BlendNone; //!< Overwrite dest with /// sf::BlendMode noBlending = sf::BlendNone; /// \endcode /// -/// In SFML, a blend mode can be specified every time you draw a sf::Drawable -/// object to a render target. It is part of the sf::RenderStates compound -/// that is passed to the member function sf::RenderTarget::draw(). +/// In SFML, a blend mode can be specified every time you draw a `sf::Drawable` +/// object to a render target. It is part of the `sf::RenderStates` compound +/// that is passed to the member function `sf::RenderTarget::draw()`. /// -/// \see sf::RenderStates, sf::RenderTarget +/// \see `sf::RenderStates`, `sf::RenderTarget` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/CircleShape.hpp b/include/SFML/Graphics/CircleShape.hpp index 45b77555d..62e1dc01e 100644 --- a/include/SFML/Graphics/CircleShape.hpp +++ b/include/SFML/Graphics/CircleShape.hpp @@ -59,7 +59,7 @@ public: /// /// \param radius New radius of the circle /// - /// \see getRadius + /// \see `getRadius` /// //////////////////////////////////////////////////////////// void setRadius(float radius); @@ -69,7 +69,7 @@ public: /// /// \return Radius of the circle /// - /// \see setRadius + /// \see `setRadius` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getRadius() const; @@ -79,7 +79,7 @@ public: /// /// \param count New number of points of the circle /// - /// \see getPointCount + /// \see `getPointCount` /// //////////////////////////////////////////////////////////// void setPointCount(std::size_t count); @@ -89,7 +89,7 @@ public: /// /// \return Number of points of the circle /// - /// \see setPointCount + /// \see `setPointCount` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::size_t getPointCount() const override; @@ -100,7 +100,7 @@ public: /// The returned point is in local coordinates, that is, /// the shape's transforms (position, rotation, scale) are /// not taken into account. - /// The result is undefined if \a index is out of the valid range. + /// The result is undefined if \a `index` is out of the valid range. /// /// \param index Index of the point to get, in range [0 .. getPointCount() - 1] /// @@ -136,9 +136,9 @@ private: /// \class sf::CircleShape /// \ingroup graphics /// -/// This class inherits all the functions of sf::Transformable +/// This class inherits all the functions of `sf::Transformable` /// (position, rotation, scale, bounds, ...) as well as the -/// functions of sf::Shape (outline, color, texture, ...). +/// functions of `sf::Shape` (outline, color, texture, ...). /// /// Usage example: /// \code @@ -153,13 +153,13 @@ private: /// /// Since the graphics card can't draw perfect circles, we have to /// fake them with multiple triangles connected to each other. The -/// "points count" property of sf::CircleShape defines how many of these +/// "points count" property of `sf::CircleShape` defines how many of these /// triangles to use, and therefore defines the quality of the circle. /// /// The number of points can also be used for another purpose; with /// small numbers you can create any regular polygon shape: /// equilateral triangle, square, pentagon, hexagon, ... /// -/// \see sf::Shape, sf::RectangleShape, sf::ConvexShape +/// \see `sf::Shape`, `sf::RectangleShape`, `sf::ConvexShape` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Color.hpp b/include/SFML/Graphics/Color.hpp index 4fd47682b..1a2c8a42f 100644 --- a/include/SFML/Graphics/Color.hpp +++ b/include/SFML/Graphics/Color.hpp @@ -43,7 +43,7 @@ public: /// \brief Default constructor /// /// Constructs an opaque black color. It is equivalent to - /// sf::Color(0, 0, 0, 255). + /// `sf::Color(0, 0, 0, 255)`. /// //////////////////////////////////////////////////////////// constexpr Color() = default; @@ -101,35 +101,35 @@ public: //////////////////////////////////////////////////////////// /// \relates Color -/// \brief Overload of the == operator +/// \brief Overload of the `operator==` /// /// This operator compares two colors and check if they are equal. /// /// \param left Left operand /// \param right Right operand /// -/// \return True if colors are equal, false if they are different +/// \return `true` if colors are equal, `false` if they are different /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator==(Color left, Color right); //////////////////////////////////////////////////////////// /// \relates Color -/// \brief Overload of the != operator +/// \brief Overload of the `operator!=` /// /// This operator compares two colors and check if they are different. /// /// \param left Left operand /// \param right Right operand /// -/// \return True if colors are different, false if they are equal +/// \return `true` if colors are different, `false` if they are equal /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator!=(Color left, Color right); //////////////////////////////////////////////////////////// /// \relates Color -/// \brief Overload of the binary + operator +/// \brief Overload of the binary `operator+` /// /// This operator returns the component-wise sum of two colors. /// Components that exceed 255 are clamped to 255. @@ -144,7 +144,7 @@ public: //////////////////////////////////////////////////////////// /// \relates Color -/// \brief Overload of the binary - operator +/// \brief Overload of the binary `operator-` /// /// This operator returns the component-wise subtraction of two colors. /// Components below 0 are clamped to 0. @@ -159,7 +159,7 @@ public: //////////////////////////////////////////////////////////// /// \relates Color -/// \brief Overload of the binary * operator +/// \brief Overload of the binary `operator*` /// /// This operator returns the component-wise multiplication /// (also called "modulation") of two colors. @@ -176,7 +176,7 @@ public: //////////////////////////////////////////////////////////// /// \relates Color -/// \brief Overload of the binary += operator +/// \brief Overload of the binary `operator+=` /// /// This operator computes the component-wise sum of two colors, /// and assigns the result to the left operand. @@ -192,7 +192,7 @@ constexpr Color& operator+=(Color& left, Color right); //////////////////////////////////////////////////////////// /// \relates Color -/// \brief Overload of the binary -= operator +/// \brief Overload of the binary `operator-=` /// /// This operator computes the component-wise subtraction of two colors, /// and assigns the result to the left operand. @@ -208,7 +208,7 @@ constexpr Color& operator-=(Color& left, Color right); //////////////////////////////////////////////////////////// /// \relates Color -/// \brief Overload of the binary *= operator +/// \brief Overload of the binary `operator*=` /// /// This operator returns the component-wise multiplication /// (also called "modulation") of two colors, and assigns @@ -233,7 +233,7 @@ constexpr Color& operator*=(Color& left, Color right); /// \class sf::Color /// \ingroup graphics /// -/// sf::Color is a simple color class composed of 4 components: +/// `sf::Color` is a simple color class composed of 4 components: /// \li Red /// \li Green /// \li Blue diff --git a/include/SFML/Graphics/ConvexShape.hpp b/include/SFML/Graphics/ConvexShape.hpp index edc3b1427..feb8473ea 100644 --- a/include/SFML/Graphics/ConvexShape.hpp +++ b/include/SFML/Graphics/ConvexShape.hpp @@ -56,12 +56,12 @@ public: //////////////////////////////////////////////////////////// /// \brief Set the number of points of the polygon /// - /// For the shape to be rendered as expected, \a count must + /// For the shape to be rendered as expected, \a `count` must /// be greater or equal to 3. /// /// \param count New number of points of the polygon /// - /// \see getPointCount + /// \see `getPointCount` /// //////////////////////////////////////////////////////////// void setPointCount(std::size_t count); @@ -71,7 +71,7 @@ public: /// /// \return Number of points of the polygon /// - /// \see setPointCount + /// \see `setPointCount` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::size_t getPointCount() const override; @@ -86,12 +86,12 @@ public: /// when not drawn (e.g. during shape initialization). /// /// Point count must be specified beforehand. The behavior is - /// undefined if \a index is greater than or equal to getPointCount. + /// undefined if \a `index` is greater than or equal to getPointCount. /// /// \param index Index of the point to change, in range [0 .. getPointCount() - 1] /// \param point New position of the point /// - /// \see getPoint + /// \see `getPoint` /// //////////////////////////////////////////////////////////// void setPoint(std::size_t index, Vector2f point); @@ -102,13 +102,13 @@ public: /// The returned point is in local coordinates, that is, /// the shape's transforms (position, rotation, scale) are /// not taken into account. - /// The result is undefined if \a index is out of the valid range. + /// The result is undefined if \a `index` is out of the valid range. /// /// \param index Index of the point to get, in range [0 .. getPointCount() - 1] /// /// \return Position of the index-th point of the polygon /// - /// \see setPoint + /// \see `setPoint` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2f getPoint(std::size_t index) const override; @@ -127,9 +127,9 @@ private: /// \class sf::ConvexShape /// \ingroup graphics /// -/// This class inherits all the functions of sf::Transformable +/// This class inherits all the functions of `sf::Transformable` /// (position, rotation, scale, bounds, ...) as well as the -/// functions of sf::Shape (outline, color, texture, ...). +/// functions of `sf::Shape` (outline, color, texture, ...). /// /// It is important to keep in mind that a convex shape must /// always be... convex, otherwise it may not be drawn correctly. @@ -150,6 +150,6 @@ private: /// window.draw(polygon); /// \endcode /// -/// \see sf::Shape, sf::RectangleShape, sf::CircleShape +/// \see `sf::Shape`, `sf::RectangleShape`, `sf::CircleShape` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/CoordinateType.hpp b/include/SFML/Graphics/CoordinateType.hpp index 74022aa0a..5c26f0340 100644 --- a/include/SFML/Graphics/CoordinateType.hpp +++ b/include/SFML/Graphics/CoordinateType.hpp @@ -31,7 +31,7 @@ namespace sf /// \ingroup graphics /// \brief Types of texture coordinates that can be used for rendering /// -/// \see sf::Texture::bind +/// \see `sf::Texture::bind` /// //////////////////////////////////////////////////////////// enum class CoordinateType diff --git a/include/SFML/Graphics/Drawable.hpp b/include/SFML/Graphics/Drawable.hpp index ce095e603..3a5c89daf 100644 --- a/include/SFML/Graphics/Drawable.hpp +++ b/include/SFML/Graphics/Drawable.hpp @@ -73,15 +73,15 @@ protected: /// \class sf::Drawable /// \ingroup graphics /// -/// sf::Drawable is a very simple base class that allows objects -/// of derived classes to be drawn to a sf::RenderTarget. +/// `sf::Drawable` is a very simple base class that allows objects +/// of derived classes to be drawn to a `sf::RenderTarget`. /// /// All you have to do in your derived class is to override the /// draw virtual function. /// -/// Note that inheriting from sf::Drawable is not mandatory, -/// but it allows this nice syntax "window.draw(object)" rather -/// than "object.draw(window)", which is more consistent with other +/// Note that inheriting from `sf::Drawable` is not mandatory, +/// but it allows this nice syntax `window.draw(object)` rather +/// than `object.draw(window)`, which is more consistent with other /// SFML classes. /// /// Example: @@ -115,6 +115,6 @@ protected: /// }; /// \endcode /// -/// \see sf::RenderTarget +/// \see `sf::RenderTarget` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Font.hpp b/include/SFML/Graphics/Font.hpp index 0a5209318..c8a00f143 100644 --- a/include/SFML/Graphics/Font.hpp +++ b/include/SFML/Graphics/Font.hpp @@ -91,13 +91,13 @@ public: /// /// \warning SFML cannot preload all the font data in this /// function, so the file has to remain accessible until - /// the sf::Font object opens a new font or is destroyed. + /// the `sf::Font` object opens a new font or is destroyed. /// /// \param filename Path of the font file to open /// /// \throws `sf::Exception` if opening was unsuccessful /// - /// \see openFromFile, openFromMemory, openFromStream + /// \see `openFromFile`, `openFromMemory`, `openFromStream` /// //////////////////////////////////////////////////////////// Font(const std::filesystem::path& filename); @@ -109,8 +109,8 @@ public: /// OpenType, SFNT, X11 PCF, Windows FNT, BDF, PFR and Type 42. /// /// \warning SFML cannot preload all the font data in this - /// function, so the buffer pointed by \a data has to remain - /// valid until the sf::Font object opens a new font or + /// function, so the buffer pointed by \a `data` has to remain + /// valid until the `sf::Font` object opens a new font or /// is destroyed. /// /// \param data Pointer to the file data in memory @@ -118,7 +118,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see openFromFile, openFromMemory, openFromStream + /// \see `openFromFile`, `openFromMemory`, `openFromStream` /// //////////////////////////////////////////////////////////// Font(const void* data, std::size_t sizeInBytes); @@ -129,18 +129,18 @@ public: /// The supported font formats are: TrueType, Type 1, CFF, /// OpenType, SFNT, X11 PCF, Windows FNT, BDF, PFR and Type 42. /// Warning: SFML cannot preload all the font data in this - /// function, so the contents of \a stream have to remain + /// function, so the contents of \a `stream` have to remain /// valid as long as the font is used. /// /// \warning SFML cannot preload all the font data in this /// function, so the stream has to remain accessible until - /// the sf::Font object opens a new font or is destroyed. + /// the `sf::Font` object opens a new font or is destroyed. /// /// \param stream Source stream to read from /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see openFromFile, openFromMemory, openFromStream + /// \see `openFromFile`, `openFromMemory`, `openFromStream` /// //////////////////////////////////////////////////////////// Font(InputStream& stream); @@ -156,13 +156,13 @@ public: /// /// \warning SFML cannot preload all the font data in this /// function, so the file has to remain accessible until - /// the sf::Font object opens a new font or is destroyed. + /// the `sf::Font` object opens a new font or is destroyed. /// /// \param filename Path of the font file to load /// - /// \return True if opening succeeded, false if it failed + /// \return `true` if opening succeeded, `false` if it failed /// - /// \see openFromMemory, openFromStream + /// \see `openFromMemory`, `openFromStream` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool openFromFile(const std::filesystem::path& filename); @@ -174,16 +174,16 @@ public: /// OpenType, SFNT, X11 PCF, Windows FNT, BDF, PFR and Type 42. /// /// \warning SFML cannot preload all the font data in this - /// function, so the buffer pointed by \a data has to remain - /// valid until the sf::Font object opens a new font or + /// function, so the buffer pointed by \a `data` has to remain + /// valid until the `sf::Font` object opens a new font or /// is destroyed. /// /// \param data Pointer to the file data in memory /// \param sizeInBytes Size of the data to load, in bytes /// - /// \return True if opening succeeded, false if it failed + /// \return `true` if opening succeeded, `false` if it failed /// - /// \see openFromFile, openFromStream + /// \see `openFromFile`, `openFromStream` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool openFromMemory(const void* data, std::size_t sizeInBytes); @@ -196,13 +196,13 @@ public: /// /// \warning SFML cannot preload all the font data in this /// function, so the stream has to remain accessible until - /// the sf::Font object opens a new font or is destroyed. + /// the `sf::Font` object opens a new font or is destroyed. /// /// \param stream Source stream to read from /// - /// \return True if opening succeeded, false if it failed + /// \return `true` if opening succeeded, `false` if it failed /// - /// \see openFromFile, openFromMemory + /// \see `openFromFile`, `openFromMemory` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool openFromStream(InputStream& stream); @@ -222,7 +222,7 @@ public: /// might be available. If the glyph is not available at the /// requested size, an empty glyph is returned. /// - /// You may want to use \ref hasGlyph to determine if the + /// You may want to use `hasGlyph` to determine if the /// glyph exists before requesting it. If the glyph does not /// exist, a font specific default is returned. /// @@ -234,7 +234,7 @@ public: /// \param bold Retrieve the bold version or the regular one? /// \param outlineThickness Thickness of outline (when != 0 the glyph will not be filled) /// - /// \return The glyph corresponding to \a codePoint and \a characterSize + /// \return The glyph corresponding to \a `codePoint` and \a `characterSize` /// //////////////////////////////////////////////////////////// [[nodiscard]] const Glyph& getGlyph(std::uint32_t codePoint, @@ -255,7 +255,7 @@ public: /// /// \param codePoint Unicode code point to check /// - /// \return True if the codepoint has a glyph representation, false otherwise + /// \return `true` if the codepoint has a glyph representation, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] bool hasGlyph(std::uint32_t codePoint) const; @@ -274,7 +274,7 @@ public: /// \param characterSize Reference character size /// \param bold Retrieve the bold version or the regular one? /// - /// \return Kerning value for \a first and \a second, in pixels + /// \return Kerning value for \a `first` and \a `second`, in pixels /// //////////////////////////////////////////////////////////// [[nodiscard]] float getKerning(std::uint32_t first, std::uint32_t second, unsigned int characterSize, bool bold = false) const; @@ -302,7 +302,7 @@ public: /// /// \return Underline position, in pixels /// - /// \see getUnderlineThickness + /// \see `getUnderlineThickness` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getUnderlinePosition(unsigned int characterSize) const; @@ -316,7 +316,7 @@ public: /// /// \return Underline thickness, in pixels /// - /// \see getUnderlinePosition + /// \see `getUnderlinePosition` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getUnderlineThickness(unsigned int characterSize) const; @@ -326,7 +326,7 @@ public: /// /// The contents of the returned texture changes as more glyphs /// are requested, thus it is not very relevant. It is mainly - /// used internally by sf::Text. + /// used internally by `sf::Text`. /// /// \param characterSize Reference character size /// @@ -344,9 +344,9 @@ public: /// you should disable it. /// The smooth filter is enabled by default. /// - /// \param smooth True to enable smoothing, false to disable it + /// \param smooth `true` to enable smoothing, `false` to disable it /// - /// \see isSmooth + /// \see `isSmooth` /// //////////////////////////////////////////////////////////// void setSmooth(bool smooth); @@ -354,9 +354,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Tell whether the smooth filter is enabled or not /// - /// \return True if smoothing is enabled, false if it is disabled + /// \return `true` if smoothing is enabled, `false` if it is disabled /// - /// \see setSmooth + /// \see `setSmooth` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isSmooth() const; @@ -420,7 +420,7 @@ private: /// \param bold Retrieve the bold version or the regular one? /// \param outlineThickness Thickness of outline (when != 0 the glyph will not be filled) /// - /// \return The glyph corresponding to \a codePoint and \a characterSize + /// \return The glyph corresponding to \a `codePoint` and \a `characterSize` /// //////////////////////////////////////////////////////////// Glyph loadGlyph(std::uint32_t codePoint, unsigned int characterSize, bool bold, float outlineThickness) const; @@ -441,7 +441,7 @@ private: /// /// \param characterSize Reference character size /// - /// \return True on success, false if any error happened + /// \return `true` on success, `false` if any error happened /// //////////////////////////////////////////////////////////// [[nodiscard]] bool setCurrentSize(unsigned int characterSize) const; @@ -476,7 +476,7 @@ private: /// stream, and supports the most common types of fonts. See /// the openFromFile function for the complete list of supported formats. /// -/// Once it is opened, a sf::Font instance provides three +/// Once it is opened, a `sf::Font` instance provides three /// types of information about the font: /// \li Global metrics, such as the line spacing /// \li Per-glyph metrics, such as bounding box or kerning @@ -484,23 +484,23 @@ private: /// /// Fonts alone are not very useful: they hold the font data /// but cannot make anything useful of it. To do so you need to -/// use the sf::Text class, which is able to properly output text +/// use the `sf::Text` class, which is able to properly output text /// with several options such as character size, style, color, /// position, rotation, etc. /// This separation allows more flexibility and better performances: -/// indeed a sf::Font is a heavy resource, and any operation on it +/// indeed a `sf::Font` is a heavy resource, and any operation on it /// is slow (often too slow for real-time applications). On the other -/// side, a sf::Text is a lightweight object which can combine the -/// glyphs data and metrics of a sf::Font to display any text on a +/// side, a `sf::Text` is a lightweight object which can combine the +/// glyphs data and metrics of a `sf::Font` to display any text on a /// render target. -/// Note that it is also possible to bind several sf::Text instances -/// to the same sf::Font. +/// Note that it is also possible to bind several `sf::Text` instances +/// to the same `sf::Font`. /// -/// It is important to note that the sf::Text instance doesn't +/// It is important to note that the `sf::Text` instance doesn't /// copy the font that it uses, it only keeps a reference to it. -/// Thus, a sf::Font must not be destructed while it is -/// used by a sf::Text (i.e. never write a function that -/// uses a local sf::Font instance for creating a text). +/// Thus, a `sf::Font` must not be destructed while it is +/// used by a `sf::Text` (i.e. never write a function that +/// uses a local `sf::Font` instance for creating a text). /// /// Usage example: /// \code @@ -519,16 +519,16 @@ private: /// \endcode /// /// Apart from opening font files, and passing them to instances -/// of sf::Text, you should normally not have to deal directly +/// of `sf::Text`, you should normally not have to deal directly /// with this class. However, it may be useful to access the /// font metrics or rasterized glyphs for advanced usage. /// /// Note that if the font is a bitmap font, it is not scalable, /// thus not all requested sizes will be available to use. This -/// needs to be taken into consideration when using sf::Text. +/// needs to be taken into consideration when using `sf::Text`. /// If you need to display text of a certain size, make sure the /// corresponding bitmap font that supports that size is used. /// -/// \see sf::Text +/// \see `sf::Text` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Glsl.hpp b/include/SFML/Graphics/Glsl.hpp index 30110d763..617f422f2 100644 --- a/include/SFML/Graphics/Glsl.hpp +++ b/include/SFML/Graphics/Glsl.hpp @@ -95,7 +95,7 @@ using Bvec3 = Vector3; //////////////////////////////////////////////////////////// /// \brief 4D float vector (\p vec4 in GLSL) /// -/// 4D float vectors can be implicitly converted from sf::Color +/// 4D float vectors can be implicitly converted from `sf::Color` /// instances. Each color channel is normalized from integers /// in [0, 255] to floating point values in [0, 1]. /// \code @@ -109,7 +109,7 @@ using Vec4 = ImplementationDefined; //////////////////////////////////////////////////////////// /// \brief 4D int vector (\p ivec4 in GLSL) /// -/// 4D int vectors can be implicitly converted from sf::Color +/// 4D int vectors can be implicitly converted from `sf::Color` /// instances. Each color channel remains unchanged inside /// the integer interval [0, 255]. /// \code @@ -143,7 +143,7 @@ using Bvec4 = ImplementationDefined; /// sf::Glsl::Mat3 matrix(array); /// \endcode /// -/// Mat3 can also be implicitly converted from sf::Transform: +/// Mat3 can also be implicitly converted from `sf::Transform`: /// \code /// sf::Transform transform; /// sf::Glsl::Mat3 matrix = transform; @@ -169,7 +169,7 @@ using Mat3 = ImplementationDefined; /// sf::Glsl::Mat4 matrix(array); /// \endcode /// -/// Mat4 can also be implicitly converted from sf::Transform: +/// Mat4 can also be implicitly converted from `sf::Transform`: /// \code /// sf::Transform transform; /// sf::Glsl::Mat4 matrix = transform; @@ -197,15 +197,15 @@ using Mat4 = priv::Matrix<4, 4>; /// \namespace sf::Glsl /// \ingroup graphics /// -/// \details The sf::Glsl namespace contains types that match +/// \details The `sf::Glsl` namespace contains types that match /// their equivalents in GLSL, the OpenGL shading language. -/// These types are exclusively used by the sf::Shader class. +/// These types are exclusively used by the `sf::Shader` class. /// -/// Types that already exist in SFML, such as \ref sf::Vector2 -/// and \ref sf::Vector3, are reused as type aliases, so you can use -/// the types in this namespace as well as the original ones. -/// Others are newly defined, such as Glsl::Vec4 or Glsl::Mat3. Their -/// actual type is an implementation detail and should not be used. +/// Types that already exist in SFML, such as `sf::Vector2` +/// and `sf::Vector3`, are reused as type aliases, so you +/// can use the types in this namespace as well as the original ones. +/// Others are newly defined, such as `Glsl::Vec4` or `Glsl::Mat3`. +/// Their actual type is an implementation detail and should not be used. /// /// All vector types support a default constructor that /// initializes every component to zero, in addition to a @@ -213,12 +213,12 @@ using Mat4 = priv::Matrix<4, 4>; /// The components are stored in member variables called /// x, y, z, and w. /// -/// All matrix types support a constructor with a float* +/// All matrix types support a constructor with a `float*` /// parameter that points to a float array of the appropriate /// size (that is, 9 in a 3x3 matrix, 16 in a 4x4 matrix). -/// Furthermore, they can be converted from sf::Transform +/// Furthermore, they can be converted from `sf::Transform` /// objects. /// -/// \see sf::Shader +/// \see `sf::Shader` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Glsl.inl b/include/SFML/Graphics/Glsl.inl index e9e1a2f93..a4a66e20c 100644 --- a/include/SFML/Graphics/Glsl.inl +++ b/include/SFML/Graphics/Glsl.inl @@ -41,7 +41,7 @@ class Transform; namespace sf::priv { //////////////////////////////////////////////////////////// -/// \brief Helper functions to copy sf::Transform to sf::Glsl::Mat3/4 +/// \brief Helper functions to copy `sf::Transform` to `sf::Glsl::Mat3/4` /// //////////////////////////////////////////////////////////// void SFML_GRAPHICS_API copyMatrix(const Transform& source, Matrix<3, 3>& dest); diff --git a/include/SFML/Graphics/Glyph.hpp b/include/SFML/Graphics/Glyph.hpp index da0dd0980..46b83d765 100644 --- a/include/SFML/Graphics/Glyph.hpp +++ b/include/SFML/Graphics/Glyph.hpp @@ -56,12 +56,12 @@ struct SFML_GRAPHICS_API Glyph /// /// A glyph is the visual representation of a character. /// -/// The sf::Glyph structure provides the information needed +/// The `sf::Glyph` structure provides the information needed /// to handle the glyph: /// \li its coordinates in the font's texture /// \li its bounding rectangle /// \li the offset to apply to get the starting position of the next glyph /// -/// \see sf::Font +/// \see `sf::Font` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Image.hpp b/include/SFML/Graphics/Image.hpp index 25d38a299..a5d12d4ae 100644 --- a/include/SFML/Graphics/Image.hpp +++ b/include/SFML/Graphics/Image.hpp @@ -59,7 +59,7 @@ public: /// /// Constructs an image with width 0 and height 0. /// - /// \see resize + /// \see `resize` /// //////////////////////////////////////////////////////////// Image() = default; @@ -76,10 +76,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the image from an array of pixels /// - /// The \a pixel array is assumed to contain 32-bits RGBA pixels, - /// and have the given \a width and \a height. If not, this is - /// an undefined behavior. - /// If \a pixels is null, an empty image is created. + /// The pixel array is assumed to contain 32-bits RGBA pixels, + /// and have the given \a `size`. If not, this is an undefined behavior. + /// If \a `pixels` is `nullptr`, an empty image is created. /// /// \param size Width and height of the image /// \param pixels Array of pixels to copy to the image @@ -98,7 +97,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// explicit Image(const std::filesystem::path& filename); @@ -115,7 +114,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// Image(const void* data, std::size_t size); @@ -131,7 +130,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// explicit Image(InputStream& stream); @@ -148,10 +147,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Resize the image from an array of pixels /// - /// The \a pixel array is assumed to contain 32-bits RGBA pixels, - /// and have the given \a width and \a height. If not, this is - /// an undefined behavior. - /// If \a pixels is null, an empty image is created. + /// The pixel array is assumed to contain 32-bits RGBA pixels, + /// and have the given \a `size`. If not, this is an undefined behavior. + /// If \a `pixels` is `nullptr`, an empty image is created. /// /// \param size Width and height of the image /// \param pixels Array of pixels to copy to the image @@ -169,9 +167,9 @@ public: /// /// \param filename Path of the image file to load /// - /// \return True if loading was successful + /// \return `true` if loading was successful /// - /// \see loadFromMemory, loadFromStream, saveToFile + /// \see `loadFromMemory`, `loadFromStream`, `saveToFile` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromFile(const std::filesystem::path& filename); @@ -187,9 +185,9 @@ public: /// \param data Pointer to the file data in memory /// \param size Size of the data to load, in bytes /// - /// \return True if loading was successful + /// \return `true` if loading was successful /// - /// \see loadFromFile, loadFromStream, saveToMemory + /// \see `loadFromFile`, `loadFromStream`, `saveToMemory` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromMemory(const void* data, std::size_t size); @@ -204,9 +202,9 @@ public: /// /// \param stream Source stream to read from /// - /// \return True if loading was successful + /// \return `true` if loading was successful /// - /// \see loadFromFile, loadFromMemory + /// \see `loadFromFile`, `loadFromMemory` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromStream(InputStream& stream); @@ -221,9 +219,9 @@ public: /// /// \param filename Path of the file to save /// - /// \return True if saving was successful + /// \return `true` if saving was successful /// - /// \see saveToMemory, loadFromFile + /// \see `saveToMemory`, `loadFromFile` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool saveToFile(const std::filesystem::path& filename) const; @@ -241,7 +239,7 @@ public: /// \return Buffer with encoded data if saving was successful, /// otherwise `std::nullopt` /// - /// \see saveToFile, loadFromMemory + /// \see `saveToFile`, `loadFromMemory` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::optional> saveToMemory(std::string_view format) const; @@ -258,7 +256,7 @@ public: /// \brief Create a transparency mask from a specified color-key /// /// This function sets the alpha value of every pixel matching - /// the given color to \a alpha (0 by default), so that they + /// the given color to \a `alpha` (0 by default), so that they /// become transparent. /// /// \param color Color to make transparent @@ -273,20 +271,20 @@ public: /// This function does a slow pixel copy and should not be /// used intensively. It can be used to prepare a complex /// static image from several others, but if you need this - /// kind of feature in real-time you'd better use sf::RenderTexture. + /// kind of feature in real-time you'd better use `sf::RenderTexture`. /// - /// If \a sourceRect is empty, the whole image is copied. - /// If \a applyAlpha is set to true, alpha blending is + /// If \a `sourceRect` is empty, the whole image is copied. + /// If \a `applyAlpha` is set to `true`, alpha blending is /// applied from the source pixels to the destination pixels - /// using the \b over operator. If it is false, the source + /// using the \b over operator. If it is `false`, the source /// pixels are copied unchanged with their alpha value. /// /// See https://en.wikipedia.org/wiki/Alpha_compositing for /// details on the \b over operator. /// /// Note that this function can fail if either image is invalid - /// (i.e. zero-sized width or height), or if \a sourceRect is - /// not within the boundaries of the \a source parameter, or + /// (i.e. zero-sized width or height), or if \a `sourceRect` is + /// not within the boundaries of the \a `source` parameter, or /// if the destination area is out of the boundaries of this image. /// /// On failure, the destination image is left unchanged. @@ -296,7 +294,7 @@ public: /// \param sourceRect Sub-rectangle of the source image to copy /// \param applyAlpha Should the copy take into account the source transparency? /// - /// \return True if the operation was successful, false otherwise + /// \return `true` if the operation was successful, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] bool copy(const Image& source, Vector2u dest, const IntRect& sourceRect = {}, bool applyAlpha = false); @@ -311,7 +309,7 @@ public: /// \param coords Coordinates of pixel to change /// \param color New color of the pixel /// - /// \see getPixel + /// \see `getPixel` /// //////////////////////////////////////////////////////////// void setPixel(Vector2u coords, Color color); @@ -327,7 +325,7 @@ public: /// /// \return Color of the pixel at given coordinates /// - /// \see setPixel + /// \see `setPixel` /// //////////////////////////////////////////////////////////// [[nodiscard]] Color getPixel(Vector2u coords) const; @@ -337,7 +335,7 @@ public: /// /// The returned value points to an array of RGBA pixels made of /// 8 bit integer components. The size of the array is - /// width * height * 4 (getSize().x * getSize().y * 4). + /// `width * height * 4 (getSize().x * getSize().y * 4)`. /// Warning: the returned pointer may become invalid if you /// modify the image, so you should never store it for too long. /// If the image is empty, a null pointer is returned. @@ -374,21 +372,21 @@ private: /// \class sf::Image /// \ingroup graphics /// -/// sf::Image is an abstraction to manipulate images -/// as bidimensional arrays of pixels. The class provides +/// `sf::Image` is an abstraction to manipulate images +/// as bi-dimensional arrays of pixels. The class provides /// functions to load, read, write and save pixels, as well /// as many other useful functions. /// -/// sf::Image can handle a unique internal representation of +/// `sf::Image` can handle a unique internal representation of /// pixels, which is RGBA 32 bits. This means that a pixel /// must be composed of 8 bit red, green, blue and alpha -/// channels -- just like a sf::Color. +/// channels -- just like a `sf::Color`. /// All the functions that return an array of pixels follow -/// this rule, and all parameters that you pass to sf::Image -/// functions (such as loadFromMemory) must use this +/// this rule, and all parameters that you pass to `sf::Image` +/// functions (such as `loadFromMemory`) must use this /// representation as well. /// -/// A sf::Image can be copied, but it is a heavy resource and +/// A `sf::Image` can be copied, but it is a heavy resource and /// if possible you should always use [const] references to /// pass or return them to avoid useless copies. /// @@ -414,6 +412,6 @@ private: /// return -1; /// \endcode /// -/// \see sf::Texture +/// \see `sf::Texture` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/PrimitiveType.hpp b/include/SFML/Graphics/PrimitiveType.hpp index 2987dd454..52682fbad 100644 --- a/include/SFML/Graphics/PrimitiveType.hpp +++ b/include/SFML/Graphics/PrimitiveType.hpp @@ -28,7 +28,7 @@ namespace sf { //////////////////////////////////////////////////////////// /// \ingroup graphics -/// \brief Types of primitives that a sf::VertexArray can render +/// \brief Types of primitives that a `sf::VertexArray` can render /// /// Points and lines have no area, therefore their thickness /// will always be 1 pixel, regardless the current transform diff --git a/include/SFML/Graphics/Rect.hpp b/include/SFML/Graphics/Rect.hpp index e6f7fad6c..0e8650804 100644 --- a/include/SFML/Graphics/Rect.hpp +++ b/include/SFML/Graphics/Rect.hpp @@ -46,7 +46,7 @@ public: /// \brief Default constructor /// /// Creates an empty rectangle (it is equivalent to calling - /// Rect({0, 0}, {0, 0})). + /// `Rect({0, 0}, {0, 0})`). /// //////////////////////////////////////////////////////////// constexpr Rect() = default; @@ -81,13 +81,13 @@ public: /// \brief Check if a point is inside the rectangle's area /// /// This check is non-inclusive. If the point lies on the - /// edge of the rectangle, this function will return false. + /// edge of the rectangle, this function will return `false`. /// /// \param point Point to test /// - /// \return True if the point is inside, false otherwise + /// \return `true` if the point is inside, `false` otherwise /// - /// \see findIntersection + /// \see `findIntersection` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool contains(Vector2 point) const; @@ -99,7 +99,7 @@ public: /// /// \return Intersection rectangle if intersecting, `std::nullopt` otherwise /// - /// \see contains + /// \see `contains` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr std::optional> findIntersection(const Rect& rectangle) const; @@ -121,14 +121,14 @@ public: //////////////////////////////////////////////////////////// /// \relates Rect -/// \brief Overload of binary operator == +/// \brief Overload of binary `operator==` /// /// This operator compares strict equality between two rectangles. /// /// \param lhs Left operand (a rectangle) /// \param rhs Right operand (a rectangle) /// -/// \return True if \a lhs is equal to \a rhs +/// \return `true` if \a lhs is equal to \a rhs /// //////////////////////////////////////////////////////////// template @@ -136,14 +136,14 @@ template //////////////////////////////////////////////////////////// /// \relates Rect -/// \brief Overload of binary operator != +/// \brief Overload of binary `operator!=` /// /// This operator compares strict difference between two rectangles. /// /// \param lhs Left operand (a rectangle) /// \param rhs Right operand (a rectangle) /// -/// \return True if \a lhs is not equal to \a rhs +/// \return `true` if \a lhs is not equal to \a rhs /// //////////////////////////////////////////////////////////// template @@ -166,24 +166,24 @@ using FloatRect = Rect; /// It is a very simple class defined for convenience, so /// its member variables (position and size) are public /// and can be accessed directly, just like the vector classes -/// (Vector2 and Vector3). +/// (`Vector2` and `Vector3`). /// -/// To keep things simple, sf::Rect doesn't define +/// To keep things simple, `sf::Rect` doesn't define /// functions to emulate the properties that are not directly /// members (such as right, bottom, etc.), it rather /// only provides intersection functions. /// -/// sf::Rect uses the usual rules for its boundaries: +/// `sf::Rect` uses the usual rules for its boundaries: /// \li The left and top edges are included in the rectangle's area /// \li The right and bottom edges are excluded from the rectangle's area /// -/// This means that sf::IntRect({0, 0}, {1, 1}) and sf::IntRect({1, 1}, {1, 1}) +/// This means that `sf::IntRect({0, 0}, {1, 1})` and `sf::IntRect({1, 1}, {1, 1})` /// don't intersect. /// -/// sf::Rect is a template and may be used with any numeric type, but +/// `sf::Rect` is a template and may be used with any numeric type, but /// for simplicity type aliases for the instantiations used by SFML are given: -/// \li sf::Rect is sf::IntRect -/// \li sf::Rect is sf::FloatRect +/// \li `sf::Rect` is `sf::IntRect` +/// \li `sf::Rect` is `sf::FloatRect` /// /// So that you don't have to care about the template syntax. /// diff --git a/include/SFML/Graphics/RectangleShape.hpp b/include/SFML/Graphics/RectangleShape.hpp index 011031a10..846903099 100644 --- a/include/SFML/Graphics/RectangleShape.hpp +++ b/include/SFML/Graphics/RectangleShape.hpp @@ -58,7 +58,7 @@ public: /// /// \param size New size of the rectangle /// - /// \see getSize + /// \see `getSize` /// //////////////////////////////////////////////////////////// void setSize(Vector2f size); @@ -68,7 +68,7 @@ public: /// /// \return Size of the rectangle /// - /// \see setSize + /// \see `setSize` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2f getSize() const; @@ -88,7 +88,7 @@ public: /// The returned point is in local coordinates, that is, /// the shape's transforms (position, rotation, scale) are /// not taken into account. - /// The result is undefined if \a index is out of the valid range. + /// The result is undefined if \a `index` is out of the valid range. /// /// \param index Index of the point to get, in range [0 .. 3] /// @@ -123,9 +123,9 @@ private: /// \class sf::RectangleShape /// \ingroup graphics /// -/// This class inherits all the functions of sf::Transformable +/// This class inherits all the functions of `sf::Transformable` /// (position, rotation, scale, bounds, ...) as well as the -/// functions of sf::Shape (outline, color, texture, ...). +/// functions of `sf::Shape` (outline, color, texture, ...). /// /// Usage example: /// \code @@ -138,6 +138,6 @@ private: /// window.draw(rectangle); /// \endcode /// -/// \see sf::Shape, sf::CircleShape, sf::ConvexShape +/// \see `sf::Shape`, `sf::CircleShape`, `sf::ConvexShape` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/RenderStates.hpp b/include/SFML/Graphics/RenderStates.hpp index a67c57f81..52f5b5944 100644 --- a/include/SFML/Graphics/RenderStates.hpp +++ b/include/SFML/Graphics/RenderStates.hpp @@ -41,7 +41,7 @@ class Shader; class Texture; //////////////////////////////////////////////////////////// -/// \brief Define the states used for drawing to a RenderTarget +/// \brief Define the states used for drawing to a `RenderTarget` /// //////////////////////////////////////////////////////////// struct SFML_GRAPHICS_API RenderStates @@ -50,13 +50,13 @@ struct SFML_GRAPHICS_API RenderStates /// \brief Default constructor /// /// Constructing a default set of render states is equivalent - /// to using sf::RenderStates::Default. + /// to using `sf::RenderStates::Default`. /// The default set defines: - /// \li the BlendAlpha blend mode - /// \li the default StencilMode (no stencil) + /// \li the `BlendAlpha` blend mode + /// \li the default `StencilMode` (no stencil) /// \li the identity transform - /// \li a null texture - /// \li a null shader + /// \li a `nullptr` texture + /// \li a `nullptr` shader /// //////////////////////////////////////////////////////////// RenderStates() = default; @@ -172,20 +172,20 @@ struct SFML_GRAPHICS_API RenderStates /// /// If you want to use a single specific render state, /// for example a shader, you can pass it directly to the Draw -/// function: sf::RenderStates has an implicit one-argument +/// function: `sf::RenderStates` has an implicit one-argument /// constructor for each state. /// \code /// window.draw(sprite, shader); /// \endcode /// /// When you're inside the Draw function of a drawable -/// object (inherited from sf::Drawable), you can +/// object (inherited from `sf::Drawable`), you can /// either pass the render states unmodified, or change /// some of them. /// For example, a transformable object will combine the /// current transform with its own transform. A sprite will /// set its texture. Etc. /// -/// \see sf::RenderTarget, sf::Drawable +/// \see `sf::RenderTarget`, `sf::Drawable` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/RenderTarget.hpp b/include/SFML/Graphics/RenderTarget.hpp index 2168448d3..a3d21f65f 100644 --- a/include/SFML/Graphics/RenderTarget.hpp +++ b/include/SFML/Graphics/RenderTarget.hpp @@ -138,11 +138,11 @@ public: /// so it is not necessary to keep the original one alive /// after calling this function. /// To restore the original view of the target, you can pass - /// the result of getDefaultView() to this function. + /// the result of `getDefaultView()` to this function. /// /// \param view New view to use /// - /// \see getView, getDefaultView + /// \see `getView`, `getDefaultView` /// //////////////////////////////////////////////////////////// void setView(const View& view); @@ -152,7 +152,7 @@ public: /// /// \return The view object that is currently used /// - /// \see setView, getDefaultView + /// \see `setView`, `getDefaultView` /// //////////////////////////////////////////////////////////// [[nodiscard]] const View& getView() const; @@ -165,7 +165,7 @@ public: /// /// \return The default view of the render target /// - /// \see setView, getView + /// \see `setView`, `getView` /// //////////////////////////////////////////////////////////// [[nodiscard]] const View& getDefaultView() const; @@ -215,7 +215,7 @@ public: /// /// \return The converted point, in "world" coordinates /// - /// \see mapCoordsToPixel + /// \see `mapCoordsToPixel` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2f mapPixelToCoords(Vector2i point) const; @@ -230,7 +230,7 @@ public: /// /// Initially, both coordinate systems (world units and target pixels) /// match perfectly. But if you define a custom view or resize your - /// render target, this assertion is not true anymore, i.e. a point + /// render target, this assertion is not `true` anymore, i.e. a point /// located at (10, 50) in your render target may map to the point /// (150, 75) in your 2D world -- if the view is translated by (140, 25). /// @@ -246,7 +246,7 @@ public: /// /// \return The converted point, in "world" units /// - /// \see mapCoordsToPixel + /// \see `mapCoordsToPixel` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2f mapPixelToCoords(Vector2i point, const View& view) const; @@ -255,7 +255,7 @@ public: /// \brief Convert a point from world coordinates to target /// coordinates, using the current view /// - /// This function is an overload of the mapCoordsToPixel + /// This function is an overload of the `mapCoordsToPixel` /// function that implicitly uses the current view. /// It is equivalent to: /// \code @@ -266,7 +266,7 @@ public: /// /// \return The converted point, in target coordinates (pixels) /// - /// \see mapPixelToCoords + /// \see `mapPixelToCoords` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2i mapCoordsToPixel(Vector2f point) const; @@ -280,7 +280,7 @@ public: /// /// Initially, both coordinate systems (world units and target pixels) /// match perfectly. But if you define a custom view or resize your - /// render target, this assertion is not true anymore, i.e. a point + /// render target, this assertion is not `true` anymore, i.e. a point /// located at (150, 75) in your 2D world may map to the pixel /// (10, 50) of your render target -- if the view is translated by (140, 25). /// @@ -293,7 +293,7 @@ public: /// /// \return The converted point, in target coordinates (pixels) /// - /// \see mapPixelToCoords + /// \see `mapPixelToCoords` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2i mapCoordsToPixel(Vector2f point, const View& view) const; @@ -355,7 +355,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Tell if the render target will use sRGB encoding when drawing on it /// - /// \return True if the render target use sRGB encoding, false otherwise + /// \return `true` if the render target use sRGB encoding, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] virtual bool isSrgb() const; @@ -375,9 +375,9 @@ public: /// target will automatically deactivate the previously active /// context (if any). /// - /// \param active True to activate, false to deactivate + /// \param active `true` to activate, `false` to deactivate /// - /// \return True if operation was successful, false otherwise + /// \return `true` if operation was successful, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] virtual bool setActive(bool active = true); @@ -392,7 +392,7 @@ public: /// \li your OpenGL states are not modified by a call to a SFML function /// /// More specifically, it must be used around code that - /// calls Draw functions. Example: + /// calls `draw` functions. Example: /// \code /// // OpenGL code here... /// window.pushGLStates(); @@ -411,7 +411,7 @@ public: /// saved and restored). Take a look at the resetGLStates /// function if you do so. /// - /// \see popGLStates + /// \see `popGLStates` /// //////////////////////////////////////////////////////////// void pushGLStates(); @@ -419,10 +419,10 @@ public: //////////////////////////////////////////////////////////// /// \brief Restore the previously saved OpenGL render states and matrices /// - /// See the description of pushGLStates to get a detailed + /// See the description of `pushGLStates` to get a detailed /// description of these functions. /// - /// \see pushGLStates + /// \see `pushGLStates` /// //////////////////////////////////////////////////////////// void popGLStates(); @@ -432,8 +432,8 @@ public: /// /// This function can be used when you mix SFML drawing /// and direct OpenGL rendering, if you choose not to use - /// pushGLStates/popGLStates. It makes sure that all OpenGL - /// states needed by SFML are set, so that subsequent draw() + /// `pushGLStates`/`popGLStates`. It makes sure that all OpenGL + /// states needed by SFML are set, so that subsequent `draw()` /// calls will work as expected. /// /// Example: @@ -556,7 +556,7 @@ private: StencilMode lastStencilMode; //!< Cached stencil std::uint64_t lastTextureId{}; //!< Cached texture CoordinateType lastCoordinateType{}; //!< Texture coordinate type - bool texCoordsArrayEnabled{}; //!< Is GL_TEXTURE_COORD_ARRAY client state enabled? + bool texCoordsArrayEnabled{}; //!< Is `GL_TEXTURE_COORD_ARRAY` client state enabled? bool useVertexCache{}; //!< Did we previously use the vertex cache? std::array vertexCache{}; //!< Pre-transformed vertices cache }; @@ -577,23 +577,23 @@ private: /// \class sf::RenderTarget /// \ingroup graphics /// -/// sf::RenderTarget defines the common behavior of all the +/// `sf::RenderTarget` defines the common behavior of all the /// 2D render targets usable in the graphics module. It makes /// it possible to draw 2D entities like sprites, shapes, text /// without using any OpenGL command directly. /// -/// A sf::RenderTarget is also able to use views (sf::View), +/// A `sf::RenderTarget` is also able to use views (`sf::View`), /// which are a kind of 2D cameras. With views you can globally /// scroll, rotate or zoom everything that is drawn, /// without having to transform every single entity. See the -/// documentation of sf::View for more details and sample pieces of +/// documentation of `sf::View` for more details and sample pieces of /// code about this class. /// /// On top of that, render targets are still able to render direct /// OpenGL stuff. It is even possible to mix together OpenGL calls /// and regular SFML drawing commands. When doing so, make sure that /// OpenGL states are not messed up by calling the -/// pushGLStates/popGLStates functions. +/// `pushGLStates`/`popGLStates` functions. /// /// While render targets are moveable, it is not valid to move them /// between threads. This will cause your program to crash. The @@ -601,6 +601,6 @@ private: /// works in multithreaded environments. Please ensure you only move /// render targets within the same thread. /// -/// \see sf::RenderWindow, sf::RenderTexture, sf::View +/// \see `sf::RenderWindow`, `sf::RenderTexture`, `sf::View` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/RenderTexture.hpp b/include/SFML/Graphics/RenderTexture.hpp index 90f6b5565..2346dbf6a 100644 --- a/include/SFML/Graphics/RenderTexture.hpp +++ b/include/SFML/Graphics/RenderTexture.hpp @@ -58,7 +58,7 @@ public: /// /// Constructs a render-texture with width 0 and height 0. /// - /// \see resize + /// \see `resize` /// //////////////////////////////////////////////////////////// RenderTexture(); @@ -66,7 +66,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct a render-texture /// - /// The last parameter, \a settings, is useful if you want to enable + /// The last parameter, \a `settings`, is useful if you want to enable /// multi-sampling or use the render-texture for OpenGL rendering that /// requires a depth or stencil buffer. Otherwise it is unnecessary, and /// you should leave this parameter at its default value. @@ -115,7 +115,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Resize the render-texture /// - /// The last parameter, \a settings, is useful if you want to enable + /// The last parameter, \a `settings`, is useful if you want to enable /// multi-sampling or use the render-texture for OpenGL rendering that /// requires a depth or stencil buffer. Otherwise it is unnecessary, and /// you should leave this parameter at its default value. @@ -126,7 +126,7 @@ public: /// \param size Width and height of the render-texture /// \param settings Additional settings for the underlying OpenGL texture and context /// - /// \return True if resizing has been successful, false if it failed + /// \return `true` if resizing has been successful, `false` if it failed /// //////////////////////////////////////////////////////////// [[nodiscard]] bool resize(Vector2u size, const ContextSettings& settings = {}); @@ -142,12 +142,12 @@ public: //////////////////////////////////////////////////////////// /// \brief Enable or disable texture smoothing /// - /// This function is similar to Texture::setSmooth. + /// This function is similar to `Texture::setSmooth`. /// This parameter is disabled by default. /// - /// \param smooth True to enable smoothing, false to disable it + /// \param smooth `true` to enable smoothing, `false` to disable it /// - /// \see isSmooth + /// \see `isSmooth` /// //////////////////////////////////////////////////////////// void setSmooth(bool smooth); @@ -155,9 +155,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Tell whether the smooth filtering is enabled or not /// - /// \return True if texture smoothing is enabled + /// \return `true` if texture smoothing is enabled /// - /// \see setSmooth + /// \see `setSmooth` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isSmooth() const; @@ -165,12 +165,12 @@ public: //////////////////////////////////////////////////////////// /// \brief Enable or disable texture repeating /// - /// This function is similar to Texture::setRepeated. + /// This function is similar to `Texture::setRepeated`. /// This parameter is disabled by default. /// - /// \param repeated True to enable repeating, false to disable it + /// \param repeated `true` to enable repeating, `false` to disable it /// - /// \see isRepeated + /// \see `isRepeated` /// //////////////////////////////////////////////////////////// void setRepeated(bool repeated); @@ -178,9 +178,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Tell whether the texture is repeated or not /// - /// \return True if texture is repeated + /// \return `true` if texture is repeated /// - /// \see setRepeated + /// \see `setRepeated` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isRepeated() const; @@ -188,7 +188,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Generate a mipmap using the current texture data /// - /// This function is similar to Texture::generateMipmap and operates + /// This function is similar to `Texture::generateMipmap` and operates /// on the texture used as the target for drawing. /// Be aware that any draw operation may modify the base level image data. /// For this reason, calling this function only makes sense after all @@ -196,7 +196,7 @@ public: /// after subsequent drawing will lead to undefined behavior if a mipmap /// had been previously generated. /// - /// \return True if mipmap generation was successful, false if unsuccessful + /// \return `true` if mipmap generation was successful, `false` if unsuccessful /// //////////////////////////////////////////////////////////// [[nodiscard]] bool generateMipmap(); @@ -211,9 +211,9 @@ public: /// want to draw OpenGL geometry to another render target /// (like a RenderWindow) don't forget to activate it again. /// - /// \param active True to activate, false to deactivate + /// \param active `true` to activate, `false` to deactivate /// - /// \return True if operation was successful, false otherwise + /// \return `true` if operation was successful, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] bool setActive(bool active = true) override; @@ -244,9 +244,9 @@ public: /// \brief Tell if the render-texture will use sRGB encoding when drawing on it /// /// You can request sRGB encoding for a render-texture - /// by having the sRgbCapable flag set for the context parameter of create() method + /// by having the sRgbCapable flag set for the context parameter of `create()` method /// - /// \return True if the render-texture use sRGB encoding, false otherwise + /// \return `true` if the render-texture use sRGB encoding, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isSrgb() const override; @@ -257,7 +257,7 @@ public: /// After drawing to the render-texture and calling Display, /// you can retrieve the updated texture using this function, /// and draw it using a sprite (for example). - /// The internal sf::Texture of a render-texture is always the + /// The internal `sf::Texture` of a render-texture is always the /// same instance, so that it is possible to call this function /// once and keep a reference to the texture even after it is /// modified. @@ -282,9 +282,9 @@ private: /// \class sf::RenderTexture /// \ingroup graphics /// -/// sf::RenderTexture is the little brother of sf::RenderWindow. +/// `sf::RenderTexture` is the little brother of `sf::RenderWindow`. /// It implements the same 2D drawing and OpenGL-related functions -/// (see their base class sf::RenderTarget for more details), +/// (see their base class `sf::RenderTarget` for more details), /// the difference is that the result is stored in an off-screen /// texture rather than being show in a window. /// @@ -332,11 +332,11 @@ private: /// } /// \endcode /// -/// Like sf::RenderWindow, sf::RenderTexture is still able to render direct +/// Like `sf::RenderWindow`, `sf::RenderTexture` is still able to render direct /// OpenGL stuff. It is even possible to mix together OpenGL calls /// and regular SFML drawing commands. If you need a depth buffer for -/// 3D rendering, don't forget to request it when calling RenderTexture::create. +/// 3D rendering, don't forget to request it when calling `RenderTexture::create`. /// -/// \see sf::RenderTarget, sf::RenderWindow, sf::View, sf::Texture +/// \see `sf::RenderTarget`, `sf::RenderWindow`, `sf::View`, `sf::Texture` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/RenderWindow.hpp b/include/SFML/Graphics/RenderWindow.hpp index 202e24208..bb68e65d0 100644 --- a/include/SFML/Graphics/RenderWindow.hpp +++ b/include/SFML/Graphics/RenderWindow.hpp @@ -58,7 +58,7 @@ public: /// \brief Default constructor /// /// This constructor doesn't actually create the window, - /// use the other constructors or call create() to do so. + /// use the other constructors or call `create()` to do so. /// //////////////////////////////////////////////////////////// RenderWindow() = default; @@ -67,18 +67,18 @@ public: /// \brief Construct a new window /// /// This constructor creates the window with the size and pixel - /// depth defined in \a mode. An optional style can be passed to + /// depth defined in \a `mode`. An optional style can be passed to /// customize the look and behavior of the window (borders, /// title bar, resizable, closable, ...). /// /// The last parameter is an optional structure specifying - /// advanced OpenGL context settings such as antialiasing, + /// advanced OpenGL context settings such as anti-aliasing, /// depth-buffer bits, etc. You shouldn't care about these /// parameters for a regular usage of the graphics module. /// /// \param mode Video mode to use (defines the width, height and depth of the rendering area of the window) /// \param title Title of the window - /// \param style %Window style, a bitwise OR combination of sf::Style enumerators + /// \param style %Window style, a bitwise OR combination of `sf::Style` enumerators /// \param state %Window state /// \param settings Additional settings for the underlying OpenGL context /// @@ -93,11 +93,11 @@ public: /// \brief Construct a new window /// /// This constructor creates the window with the size and pixel - /// depth defined in \a mode. If \a state is State::Fullscreen, - /// then \a mode must be a valid video mode. + /// depth defined in \a `mode`. If \a `state` is `State::Fullscreen`, + /// then \a `mode` must be a valid video mode. /// /// The last parameter is an optional structure specifying - /// advanced OpenGL context settings such as antialiasing, + /// advanced OpenGL context settings such as anti-aliasing, /// depth-buffer bits, etc. /// /// \param mode Video mode to use (defines the width, height and depth of the rendering area of the window) @@ -115,7 +115,7 @@ public: /// rendering area into an already existing control. /// /// The second parameter is an optional structure specifying - /// advanced OpenGL context settings such as antialiasing, + /// advanced OpenGL context settings such as anti-aliasing, /// depth-buffer bits, etc. You shouldn't care about these /// parameters for a regular usage of the graphics module. /// @@ -153,9 +153,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Tell if the window will use sRGB encoding when drawing on it /// - /// You can request sRGB encoding for a window by having the sRgbCapable flag set in the ContextSettings + /// You can request sRGB encoding for a window by having the sRgbCapable flag set in the `ContextSettings` /// - /// \return True if the window use sRGB encoding, false otherwise + /// \return `true` if the window use sRGB encoding, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isSrgb() const override; @@ -169,11 +169,11 @@ public: /// on the previous thread first if it was active. /// Only one window can be active on a thread at a time, thus /// the window previously active (if any) automatically gets deactivated. - /// This is not to be confused with requestFocus(). + /// This is not to be confused with `requestFocus()`. /// - /// \param active True to activate, false to deactivate + /// \param active `true` to activate, `false` to deactivate /// - /// \return True if operation was successful, false otherwise + /// \return `true` if operation was successful, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] bool setActive(bool active = true) override; @@ -212,19 +212,19 @@ private: /// \class sf::RenderWindow /// \ingroup graphics /// -/// sf::RenderWindow is the main class of the Graphics module. +/// `sf::RenderWindow` is the main class of the Graphics module. /// It defines an OS window that can be painted using the other /// classes of the graphics module. /// -/// sf::RenderWindow is derived from sf::Window, thus it inherits +/// `sf::RenderWindow` is derived from `sf::Window`, thus it inherits /// all its features: events, window management, OpenGL rendering, -/// etc. See the documentation of sf::Window for a more complete +/// etc. See the documentation of `sf::Window` for a more complete /// description of all these features, as well as code examples. /// -/// On top of that, sf::RenderWindow adds more features related to +/// On top of that, `sf::RenderWindow` adds more features related to /// 2D drawing with the graphics module (see its base class -/// sf::RenderTarget for more details). -/// Here is a typical rendering and event loop with a sf::RenderWindow: +/// `sf::RenderTarget` for more details). +/// Here is a typical rendering and event loop with a `sf::RenderWindow`: /// /// \code /// // Declare and create a new render-window @@ -257,7 +257,7 @@ private: /// } /// \endcode /// -/// Like sf::Window, sf::RenderWindow is still able to render direct +/// Like `sf::Window`, `sf::RenderWindow` is still able to render direct /// OpenGL stuff. It is even possible to mix together OpenGL calls /// and regular SFML drawing commands. /// @@ -303,6 +303,6 @@ private: /// } /// \endcode /// -/// \see sf::Window, sf::RenderTarget, sf::RenderTexture, sf::View +/// \see `sf::Window`, `sf::RenderTarget`, `sf::RenderTexture`, `sf::View` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Shader.hpp b/include/SFML/Graphics/Shader.hpp index 5b999d816..8d3c6ab51 100644 --- a/include/SFML/Graphics/Shader.hpp +++ b/include/SFML/Graphics/Shader.hpp @@ -68,7 +68,7 @@ public: /// \brief Special type that can be passed to setUniform(), /// and that represents the texture of the object being drawn /// - /// \see setUniform(const std::string&, CurrentTextureType) + /// \see `setUniform(const std::string&, CurrentTextureType)` /// //////////////////////////////////////////////////////////// struct CurrentTextureType @@ -78,7 +78,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Represents the texture of the object being drawn /// - /// \see setUniform(const std::string&, CurrentTextureType) + /// \see `setUniform(const std::string&, CurrentTextureType)` /// //////////////////////////////////////////////////////////// // NOLINTNEXTLINE(readability-identifier-naming) @@ -141,7 +141,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// Shader(const std::filesystem::path& filename, Type type); @@ -162,7 +162,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// Shader(const std::filesystem::path& vertexShaderFilename, const std::filesystem::path& fragmentShaderFilename); @@ -184,7 +184,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// Shader(const std::filesystem::path& vertexShaderFilename, @@ -206,7 +206,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// Shader(std::string_view shader, Type type); @@ -227,7 +227,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// Shader(std::string_view vertexShader, std::string_view fragmentShader); @@ -249,7 +249,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// Shader(std::string_view vertexShader, std::string_view geometryShader, std::string_view fragmentShader); @@ -269,7 +269,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// Shader(InputStream& stream, Type type); @@ -290,7 +290,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// Shader(InputStream& vertexShaderStream, InputStream& fragmentShaderStream); @@ -312,7 +312,7 @@ public: /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// Shader(InputStream& vertexShaderStream, InputStream& geometryShaderStream, InputStream& fragmentShaderStream); @@ -331,9 +331,9 @@ public: /// \param filename Path of the vertex, geometry or fragment shader file to load /// \param type Type of shader (vertex, geometry or fragment) /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromMemory, loadFromStream + /// \see `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromFile(const std::filesystem::path& filename, Type type); @@ -352,9 +352,9 @@ public: /// \param vertexShaderFilename Path of the vertex shader file to load /// \param fragmentShaderFilename Path of the fragment shader file to load /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromMemory, loadFromStream + /// \see `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromFile(const std::filesystem::path& vertexShaderFilename, @@ -375,9 +375,9 @@ public: /// \param geometryShaderFilename Path of the geometry shader file to load /// \param fragmentShaderFilename Path of the fragment shader file to load /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromMemory, loadFromStream + /// \see `loadFromMemory`, `loadFromStream` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromFile(const std::filesystem::path& vertexShaderFilename, @@ -397,9 +397,9 @@ public: /// \param shader String containing the source code of the shader /// \param type Type of shader (vertex, geometry or fragment) /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromFile, loadFromStream + /// \see `loadFromFile`, `loadFromStream` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromMemory(std::string_view shader, Type type); @@ -418,9 +418,9 @@ public: /// \param vertexShader String containing the source code of the vertex shader /// \param fragmentShader String containing the source code of the fragment shader /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromFile, loadFromStream + /// \see `loadFromFile`, `loadFromStream` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromMemory(std::string_view vertexShader, std::string_view fragmentShader); @@ -440,9 +440,9 @@ public: /// \param geometryShader String containing the source code of the geometry shader /// \param fragmentShader String containing the source code of the fragment shader /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromFile, loadFromStream + /// \see `loadFromFile`, `loadFromStream` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromMemory(std::string_view vertexShader, @@ -462,9 +462,9 @@ public: /// \param stream Source stream to read from /// \param type Type of shader (vertex, geometry or fragment) /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromFile, loadFromMemory + /// \see `loadFromFile`, `loadFromMemory` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromStream(InputStream& stream, Type type); @@ -483,9 +483,9 @@ public: /// \param vertexShaderStream Source stream to read the vertex shader from /// \param fragmentShaderStream Source stream to read the fragment shader from /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromFile, loadFromMemory + /// \see `loadFromFile`, `loadFromMemory` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromStream(InputStream& vertexShaderStream, InputStream& fragmentShaderStream); @@ -505,9 +505,9 @@ public: /// \param geometryShaderStream Source stream to read the geometry shader from /// \param fragmentShaderStream Source stream to read the fragment shader from /// - /// \return True if loading succeeded, false if it failed + /// \return `true` if loading succeeded, `false` if it failed /// - /// \see loadFromFile, loadFromMemory + /// \see `loadFromFile`, `loadFromMemory` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromStream(InputStream& vertexShaderStream, @@ -544,14 +544,14 @@ public: //////////////////////////////////////////////////////////// /// \brief Specify value for \p vec4 uniform /// - /// This overload can also be called with sf::Color objects - /// that are converted to sf::Glsl::Vec4. + /// This overload can also be called with `sf::Color` objects + /// that are converted to `sf::Glsl::Vec4`. /// /// It is important to note that the components of the color are /// normalized before being passed to the shader. Therefore, /// they are converted from range [0 .. 255] to range [0 .. 1]. - /// For example, a sf::Color(255, 127, 0, 255) will be transformed - /// to a vec4(1.0, 0.5, 0.0, 1.0) in the shader. + /// For example, a `sf::Color(255, 127, 0, 255)` will be transformed + /// to a `vec4(1.0, 0.5, 0.0, 1.0)` in the shader. /// /// \param name Name of the uniform variable in GLSL /// \param vector Value of the vec4 vector @@ -589,13 +589,13 @@ public: //////////////////////////////////////////////////////////// /// \brief Specify value for \p ivec4 uniform /// - /// This overload can also be called with sf::Color objects - /// that are converted to sf::Glsl::Ivec4. + /// This overload can also be called with `sf::Color` objects + /// that are converted to `sf::Glsl::Ivec4`. /// /// If color conversions are used, the ivec4 uniform in GLSL - /// will hold the same values as the original sf::Color - /// instance. For example, sf::Color(255, 127, 0, 255) is - /// mapped to ivec4(255, 127, 0, 255). + /// will hold the same values as the original `sf::Color` + /// instance. For example, `sf::Color(255, 127, 0, 255)` is + /// mapped to `ivec4(255, 127, 0, 255)`. /// /// \param name Name of the uniform variable in GLSL /// \param vector Value of the ivec4 vector @@ -673,12 +673,12 @@ public: /// ... /// shader.setUniform("the_texture", texture); /// \endcode - /// It is important to note that \a texture must remain alive as long + /// It is important to note that \a `texture` must remain alive as long /// as the shader uses it, no copy is made internally. /// /// To use the texture of the object being drawn, which cannot be /// known in advance, you can pass the special value - /// sf::Shader::CurrentTexture: + /// `sf::Shader::CurrentTexture`: /// \code /// shader.setUniform("the_texture", sf::Shader::CurrentTexture). /// \endcode @@ -701,7 +701,7 @@ public: /// This overload maps a shader texture variable to the /// texture of the object being drawn, which cannot be /// known in advance. The second argument must be - /// sf::Shader::CurrentTexture. + /// `sf::Shader::CurrentTexture`. /// The corresponding parameter in the shader must be a 2D texture /// (\p sampler2D GLSL type). /// @@ -795,7 +795,7 @@ public: /// /// This function is not part of the graphics API, it mustn't be /// used when drawing SFML entities. It must be used only if you - /// mix sf::Shader with OpenGL code. + /// mix `sf::Shader` with OpenGL code. /// /// \code /// sf::Shader s1, s2; @@ -817,10 +817,10 @@ public: /// \brief Tell whether or not the system supports shaders /// /// This function should always be called before using - /// the shader features. If it returns false, then - /// any attempt to use sf::Shader will fail. + /// the shader features. If it returns `false`, then + /// any attempt to use `sf::Shader` will fail. /// - /// \return True if shaders are supported, false otherwise + /// \return `true` if shaders are supported, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] static bool isAvailable(); @@ -829,17 +829,17 @@ public: /// \brief Tell whether or not the system supports geometry shaders /// /// This function should always be called before using - /// the geometry shader features. If it returns false, then - /// any attempt to use sf::Shader geometry shader features will fail. + /// the geometry shader features. If it returns `false`, then + /// any attempt to use `sf::Shader` geometry shader features will fail. /// - /// This function can only return true if isAvailable() would also - /// return true, since shaders in general have to be supported in + /// This function can only return `true` if isAvailable() would also + /// return `true`, since shaders in general have to be supported in /// order for geometry shaders to be supported as well. /// /// Note: The first call to this function, whether by your /// code or SFML will result in a context switch. /// - /// \return True if geometry shaders are supported, false otherwise + /// \return `true` if geometry shaders are supported, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] static bool isGeometryAvailable(); @@ -855,7 +855,7 @@ private: /// \param geometryShaderCode Source code of the geometry shader /// \param fragmentShaderCode Source code of the fragment shader /// - /// \return True on success, false if any error happened + /// \return `true` on success, `false` if any error happened /// //////////////////////////////////////////////////////////// [[nodiscard]] bool compile(std::string_view vertexShaderCode, @@ -921,7 +921,7 @@ private: /// \li Geometry shaders, that process primitives /// \li Fragment (pixel) shaders, that process pixels /// -/// A sf::Shader can be composed of either a vertex shader +/// A `sf::Shader` can be composed of either a vertex shader /// alone, a geometry shader alone, a fragment shader alone, /// or any combination of them. (see the variants of the /// load functions). @@ -932,19 +932,19 @@ private: /// for SFML. /// /// Like any C/C++ program, a GLSL shader has its own variables -/// called \a uniforms that you can set from your C++ application. -/// sf::Shader handles different types of uniforms: +/// called \a `uniforms` that you can set from your C++ application. +/// `sf::Shader` handles different types of uniforms: /// \li scalars: \p float, \p int, \p bool /// \li vectors (2, 3 or 4 components) /// \li matrices (3x3 or 4x4) /// \li samplers (textures) /// /// Some SFML-specific types can be converted: -/// \li sf::Color as a 4D vector (\p vec4) -/// \li sf::Transform as matrices (\p mat3 or \p mat4) +/// \li `sf::Color` as a 4D vector (\p vec4) +/// \li `sf::Transform` as matrices (\p mat3 or \p mat4) /// /// Every uniform variable in a shader can be set through one of the -/// setUniform() or setUniformArray() overloads. For example, if you +/// `setUniform()` or `setUniformArray()` overloads. For example, if you /// have a shader with the following uniforms: /// \code /// uniform float offset; @@ -955,7 +955,7 @@ private: /// uniform sampler2D current; /// \endcode /// You can set their values from C++ code as follows, using the types -/// defined in the sf::Glsl namespace: +/// defined in the `sf::Glsl` namespace: /// \code /// shader.setUniform("offset", 2.f); /// shader.setUniform("point", sf::Vector3f(0.5f, 0.8f, 0.3f)); @@ -965,12 +965,12 @@ private: /// shader.setUniform("current", sf::Shader::CurrentTexture); /// \endcode /// -/// The special Shader::CurrentTexture argument maps the +/// The special `Shader::CurrentTexture` argument maps the /// given \p sampler2D uniform to the current texture of the /// object being drawn (which cannot be known in advance). /// /// To apply a shader to a drawable, you must pass it as an -/// additional parameter to the \ref RenderWindow::draw function: +/// additional parameter to the `RenderWindow::draw` function: /// \code /// window.draw(sprite, &shader); /// \endcode @@ -986,22 +986,22 @@ private: /// be null (which means "no shader"). /// /// Shaders can be used on any drawable, but some combinations are -/// not interesting. For example, using a vertex shader on a sf::Sprite +/// not interesting. For example, using a vertex shader on a `sf::Sprite` /// is limited because there are only 4 vertices, the sprite would /// have to be subdivided in order to apply wave effects. -/// Another bad example is a fragment shader with sf::Text: the texture +/// Another bad example is a fragment shader with `sf::Text`: the texture /// of the text is not the actual text that you see on screen, it is /// a big texture containing all the characters of the font in an /// arbitrary order; thus, texture lookups on pixels other than the /// current one may not give you the expected result. /// /// Shaders can also be used to apply global post-effects to the -/// current contents of the target (like the old sf::PostFx class -/// in SFML 1). This can be done in two different ways: -/// \li draw everything to a sf::RenderTexture, then draw it to +/// current contents of the target. +/// This can be done in two different ways: +/// \li draw everything to a `sf::RenderTexture`, then draw it to /// the main target using the shader /// \li draw everything directly to the main target, then use -/// sf::Texture::update(Window&) to copy its contents to a texture +/// `sf::Texture::update(Window&)` to copy its contents to a texture /// and draw it to the main target using the shader /// /// The first technique is more optimized because it doesn't involve @@ -1009,8 +1009,8 @@ private: /// second one doesn't impact the rendering process and can be /// easily inserted anywhere without impacting all the code. /// -/// Like sf::Texture that can be used as a raw OpenGL texture, -/// sf::Shader can also be used directly as a raw shader for +/// Like `sf::Texture` that can be used as a raw OpenGL texture, +/// `sf::Shader` can also be used directly as a raw shader for /// custom OpenGL geometry. /// \code /// sf::Shader::bind(&shader); @@ -1018,6 +1018,6 @@ private: /// sf::Shader::bind(nullptr); /// \endcode /// -/// \see sf::Glsl +/// \see `sf::Glsl` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Shape.hpp b/include/SFML/Graphics/Shape.hpp index fff12993d..cd45f9fb2 100644 --- a/include/SFML/Graphics/Shape.hpp +++ b/include/SFML/Graphics/Shape.hpp @@ -57,21 +57,21 @@ public: //////////////////////////////////////////////////////////// /// \brief Change the source texture of the shape /// - /// The \a texture argument refers to a texture that must + /// The \a `texture` argument refers to a texture that must /// exist as long as the shape uses it. Indeed, the shape /// doesn't store its own copy of the texture, but rather keeps /// a pointer to the one that you passed to this function. /// If the source texture is destroyed and the shape tries to /// use it, the behavior is undefined. - /// \a texture can be a null pointer to disable texturing. - /// If \a resetRect is true, the TextureRect property of + /// \a `texture` can be a null pointer to disable texturing. + /// If \a `resetRect` is `true`, the `TextureRect` property of /// the shape is automatically adjusted to the size of the new - /// texture. If it is false, the texture rect is left unchanged. + /// texture. If it is `false`, the texture rect is left unchanged. /// /// \param texture New texture /// \param resetRect Should the texture rect be reset to the size of the new texture? /// - /// \see getTexture, setTextureRect + /// \see `getTexture`, `setTextureRect` /// //////////////////////////////////////////////////////////// void setTexture(const Texture* texture, bool resetRect = false); @@ -85,7 +85,7 @@ public: /// /// \param rect Rectangle defining the region of the texture to display /// - /// \see getTextureRect, setTexture + /// \see `getTextureRect`, `setTexture` /// //////////////////////////////////////////////////////////// void setTextureRect(const IntRect& rect); @@ -96,13 +96,13 @@ public: /// This color is modulated (multiplied) with the shape's /// texture if any. It can be used to colorize the shape, /// or change its global opacity. - /// You can use sf::Color::Transparent to make the inside of + /// You can use `sf::Color::Transparent to make the inside of /// the shape transparent, and have the outline alone. /// By default, the shape's fill color is opaque white. /// /// \param color New color of the shape /// - /// \see getFillColor, setOutlineColor + /// \see `getFillColor`, `setOutlineColor` /// //////////////////////////////////////////////////////////// void setFillColor(Color color); @@ -114,7 +114,7 @@ public: /// /// \param color New outline color of the shape /// - /// \see getOutlineColor, setFillColor + /// \see `getOutlineColor`, `setFillColor` /// //////////////////////////////////////////////////////////// void setOutlineColor(Color color); @@ -129,7 +129,7 @@ public: /// /// \param thickness New outline thickness /// - /// \see getOutlineThickness + /// \see `getOutlineThickness` /// //////////////////////////////////////////////////////////// void setOutlineThickness(float thickness); @@ -137,13 +137,13 @@ public: //////////////////////////////////////////////////////////// /// \brief Get the source texture of the shape /// - /// If the shape has no source texture, a null pointer is returned. + /// If the shape has no source texture, a `nullptr` is returned. /// The returned pointer is const, which means that you can't /// modify the texture when you retrieve it with this function. /// /// \return Pointer to the shape's texture /// - /// \see setTexture + /// \see `setTexture` /// //////////////////////////////////////////////////////////// [[nodiscard]] const Texture* getTexture() const; @@ -153,7 +153,7 @@ public: /// /// \return Texture rectangle of the shape /// - /// \see setTextureRect + /// \see `setTextureRect` /// //////////////////////////////////////////////////////////// [[nodiscard]] const IntRect& getTextureRect() const; @@ -163,7 +163,7 @@ public: /// /// \return Fill color of the shape /// - /// \see setFillColor + /// \see `setFillColor` /// //////////////////////////////////////////////////////////// [[nodiscard]] Color getFillColor() const; @@ -173,7 +173,7 @@ public: /// /// \return Outline color of the shape /// - /// \see setOutlineColor + /// \see `setOutlineColor` /// //////////////////////////////////////////////////////////// [[nodiscard]] Color getOutlineColor() const; @@ -183,7 +183,7 @@ public: /// /// \return Outline thickness of the shape /// - /// \see setOutlineThickness + /// \see `setOutlineThickness` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getOutlineThickness() const; @@ -193,7 +193,7 @@ public: /// /// \return Number of points of the shape /// - /// \see getPoint + /// \see `getPoint` /// //////////////////////////////////////////////////////////// [[nodiscard]] virtual std::size_t getPointCount() const = 0; @@ -204,13 +204,13 @@ public: /// The returned point is in local coordinates, that is, /// the shape's transforms (position, rotation, scale) are /// not taken into account. - /// The result is undefined if \a index is out of the valid range. + /// The result is undefined if \a `index` is out of the valid range. /// /// \param index Index of the point to get, in range [0 .. getPointCount() - 1] /// /// \return index-th point of the shape /// - /// \see getPointCount + /// \see `getPointCount` /// //////////////////////////////////////////////////////////// [[nodiscard]] virtual Vector2f getPoint(std::size_t index) const = 0; @@ -250,7 +250,7 @@ public: /// In other words, this function returns the bounds of the /// shape in the global 2D world's coordinate system. /// - /// This function does not necessarily return the \a minimal + /// This function does not necessarily return the \a `minimal` /// bounding rectangle. It merely ensures that the returned /// rectangle covers all the vertices (but possibly more). /// This allows for a fast approximation of the bounds as a @@ -328,7 +328,7 @@ private: /// \class sf::Shape /// \ingroup graphics /// -/// sf::Shape is a drawable class that allows to define and +/// `sf::Shape` is a drawable class that allows to define and /// display a custom convex shape on a render target. /// It's only an abstract base, it needs to be specialized for /// concrete types of shapes (circle, rectangle, convex polygon, @@ -344,7 +344,7 @@ private: /// /// Each feature is optional, and can be disabled easily: /// \li the texture can be null -/// \li the fill/outline colors can be sf::Color::Transparent +/// \li the fill/outline colors can be `sf::Color::Transparent` /// \li the outline thickness can be zero /// /// You can write your own derived shape class, there are only @@ -352,6 +352,6 @@ private: /// \li getPointCount must return the number of points of the shape /// \li getPoint must return the points of the shape /// -/// \see sf::RectangleShape, sf::CircleShape, sf::ConvexShape, sf::Transformable +/// \see `sf::RectangleShape`, `sf::CircleShape`, `sf::ConvexShape`, `sf::Transformable` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Sprite.hpp b/include/SFML/Graphics/Sprite.hpp index c35dee121..787a1d551 100644 --- a/include/SFML/Graphics/Sprite.hpp +++ b/include/SFML/Graphics/Sprite.hpp @@ -55,7 +55,7 @@ public: /// /// \param texture Source texture /// - /// \see setTexture + /// \see `setTexture` /// //////////////////////////////////////////////////////////// explicit Sprite(const Texture& texture); @@ -72,7 +72,7 @@ public: /// \param texture Source texture /// \param rectangle Sub-rectangle of the texture to assign to the sprite /// - /// \see setTexture, setTextureRect + /// \see `setTexture`, `setTextureRect` /// //////////////////////////////////////////////////////////// Sprite(const Texture& texture, const IntRect& rectangle); @@ -86,20 +86,20 @@ public: //////////////////////////////////////////////////////////// /// \brief Change the source texture of the sprite /// - /// The \a texture argument refers to a texture that must + /// The \a `texture` argument refers to a texture that must /// exist as long as the sprite uses it. Indeed, the sprite /// doesn't store its own copy of the texture, but rather keeps /// a pointer to the one that you passed to this function. /// If the source texture is destroyed and the sprite tries to /// use it, the behavior is undefined. - /// If \a resetRect is true, the TextureRect property of + /// If \a `resetRect` is `true`, the `TextureRect` property of /// the sprite is automatically adjusted to the size of the new - /// texture. If it is false, the texture rect is left unchanged. + /// texture. If it is `false`, the texture rect is left unchanged. /// /// \param texture New texture /// \param resetRect Should the texture rect be reset to the size of the new texture? /// - /// \see getTexture, setTextureRect + /// \see `getTexture`, `setTextureRect` /// //////////////////////////////////////////////////////////// void setTexture(const Texture& texture, bool resetRect = false); @@ -119,7 +119,7 @@ public: /// /// \param rectangle Rectangle defining the region of the texture to display /// - /// \see getTextureRect, setTexture + /// \see `getTextureRect`, `setTexture` /// //////////////////////////////////////////////////////////// void setTextureRect(const IntRect& rectangle); @@ -134,7 +134,7 @@ public: /// /// \param color New color of the sprite /// - /// \see getColor + /// \see `getColor` /// //////////////////////////////////////////////////////////// void setColor(Color color); @@ -147,7 +147,7 @@ public: /// /// \return Reference to the sprite's texture /// - /// \see setTexture + /// \see `setTexture` /// //////////////////////////////////////////////////////////// [[nodiscard]] const Texture& getTexture() const; @@ -157,7 +157,7 @@ public: /// /// \return Texture rectangle of the sprite /// - /// \see setTextureRect + /// \see `setTextureRect` /// //////////////////////////////////////////////////////////// [[nodiscard]] const IntRect& getTextureRect() const; @@ -167,7 +167,7 @@ public: /// /// \return Global color of the sprite /// - /// \see setColor + /// \see `setColor` /// //////////////////////////////////////////////////////////// [[nodiscard]] Color getColor() const; @@ -231,32 +231,32 @@ private: /// \class sf::Sprite /// \ingroup graphics /// -/// sf::Sprite is a drawable class that allows to easily display +/// `sf::Sprite` is a drawable class that allows to easily display /// a texture (or a part of it) on a render target. /// -/// It inherits all the functions from sf::Transformable: +/// It inherits all the functions from `sf::Transformable`: /// position, rotation, scale, origin. It also adds sprite-specific /// properties such as the texture to use, the part of it to display, /// and some convenience functions to change the overall color of the /// sprite, or to get its bounding rectangle. /// -/// sf::Sprite works in combination with the sf::Texture class, which +/// `sf::Sprite` works in combination with the `sf::Texture` class, which /// loads and provides the pixel data of a given texture. /// -/// The separation of sf::Sprite and sf::Texture allows more flexibility -/// and better performances: indeed a sf::Texture is a heavy resource, +/// The separation of `sf::Sprite` and `sf::Texture` allows more flexibility +/// and better performances: indeed a `sf::Texture` is a heavy resource, /// and any operation on it is slow (often too slow for real-time -/// applications). On the other side, a sf::Sprite is a lightweight -/// object which can use the pixel data of a sf::Texture and draw +/// applications). On the other side, a `sf::Sprite` is a lightweight +/// object which can use the pixel data of a `sf::Texture` and draw /// it with its own transformation/color/blending attributes. /// -/// It is important to note that the sf::Sprite instance doesn't +/// It is important to note that the `sf::Sprite` instance doesn't /// copy the texture that it uses, it only keeps a reference to it. -/// Thus, a sf::Texture must not be destroyed while it is -/// used by a sf::Sprite (i.e. never write a function that -/// uses a local sf::Texture instance for creating a sprite). +/// Thus, a `sf::Texture` must not be destroyed while it is +/// used by a `sf::Sprite` (i.e. never write a function that +/// uses a local `sf::Texture` instance for creating a sprite). /// -/// See also the note on coordinates and undistorted rendering in sf::Transformable. +/// See also the note on coordinates and undistorted rendering in `sf::Transformable`. /// /// Usage example: /// \code @@ -273,6 +273,6 @@ private: /// window.draw(sprite); /// \endcode /// -/// \see sf::Texture, sf::Transformable +/// \see `sf::Texture`, `sf::Transformable` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/StencilMode.hpp b/include/SFML/Graphics/StencilMode.hpp index 39879aa51..9672f02d3 100644 --- a/include/SFML/Graphics/StencilMode.hpp +++ b/include/SFML/Graphics/StencilMode.hpp @@ -37,7 +37,7 @@ namespace sf /// \brief Enumeration of the stencil test comparisons that can be performed /// /// The comparisons are mapped directly to their OpenGL equivalents, -/// specified by glStencilFunc(). +/// specified by `glStencilFunc()`. //////////////////////////////////////////////////////// enum class StencilComparison { @@ -47,7 +47,7 @@ enum class StencilComparison Greater, //!< The stencil test passes if the new value is greater than the value in the stencil buffer GreaterEqual, //!< The stencil test passes if the new value is greater than or equal to the value in the stencil buffer Equal, //!< The stencil test passes if the new value is strictly equal to the value in the stencil buffer - NotEqual, //!< The stencil test passes if the new value is strictly inequal to the value in the stencil buffer + NotEqual, //!< The stencil test passes if the new value is strictly unequal to the value in the stencil buffer Always //!< The stencil test always passes }; @@ -55,7 +55,7 @@ enum class StencilComparison /// \brief Enumeration of the stencil buffer update operations /// /// The update operations are mapped directly to their OpenGL equivalents, -/// specified by glStencilOp(). +/// specified by `glStencilOp()`. //////////////////////////////////////////////////////// enum class StencilUpdateOperation { @@ -115,24 +115,24 @@ struct SFML_GRAPHICS_API StencilMode //////////////////////////////////////////////////////////// /// \relates StencilMode -/// \brief Overload of the == operator +/// \brief Overload of the `operator==` /// /// \param left Left operand /// \param right Right operand /// -/// \return True if stencil modes are equal, false if they are different +/// \return `true` if stencil modes are equal, `false` if they are different /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_GRAPHICS_API bool operator==(const StencilMode& left, const StencilMode& right); //////////////////////////////////////////////////////////// /// \relates StencilMode -/// \brief Overload of the != operator +/// \brief Overload of the `operator!=` /// /// \param left Left operand /// \param right Right operand /// -/// \return True if stencil modes are different, false if they are equal +/// \return `true` if stencil modes are different, `false` if they are equal /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_GRAPHICS_API bool operator!=(const StencilMode& left, const StencilMode& right); @@ -144,7 +144,7 @@ struct SFML_GRAPHICS_API StencilMode /// \class sf::StencilMode /// \ingroup graphics /// -/// sf::StencilMode is a class that controls stencil testing. +/// `sf::StencilMode` is a class that controls stencil testing. /// /// In addition to drawing to the visible portion of a render target, /// there is the possibility to "draw" to a so-called stencil buffer. @@ -154,23 +154,23 @@ struct SFML_GRAPHICS_API StencilMode /// value that can be represented depends on what is supported by the system. /// Typically support for a 8-bit stencil buffer should always be available. /// This will also have to be requested when creating a render target via -/// the sf::ContextSettings that is passed during creation. Stencil testing +/// the `sf::ContextSettings` that is passed during creation. Stencil testing /// will not work if there is no stencil buffer available in the target /// that is being drawn to. /// /// Initially, just like with the visible color buffer, the stencil value of -/// each pixel is set to an undefined value. Calling sf::RenderTarget::clear -/// will set each pixel's stencil value to 0. sf::RenderTarget::clear can be +/// each pixel is set to an undefined value. Calling `sf::RenderTarget::clear` +/// will set each pixel's stencil value to 0. `sf::RenderTarget::clear` can be /// called at any time to reset the stencil values back to 0. /// /// When drawing an object, before each pixel of the color buffer is updated /// with its new color value, the stencil test is performed. During this test /// 2 values are compared with each other: the reference value that is passed -/// via sf::StencilMode and the value that is currently in the stencil buffer. +/// via `sf::StencilMode` and the value that is currently in the stencil buffer. /// The arithmetic comparison that is performed on the 2 values can also be -/// controlled via sf::StencilMode. Depending on whether the test passes i.e. -/// the comparison yields true, the color buffer is updated with its new RGBA -/// value and if set in sf::StencilMode the stencil buffer is updated +/// controlled via `sf::StencilMode`. Depending on whether the test passes i.e. +/// the comparison yields `true`, the color buffer is updated with its new RGBA +/// value and if set in `sf::StencilMode` the stencil buffer is updated /// accordingly. The new stencil value will be used during stencil testing the /// next time the pixel is drawn to. /// @@ -183,7 +183,7 @@ struct SFML_GRAPHICS_API StencilMode /// \li Stencil Only Update (\ref stencilOnly) /// /// The stencil comparison specifies the comparison that is performed between -/// the reference value of the currently active sf::StencilMode and the value +/// the reference value of the currently active `sf::StencilMode` and the value /// that is currently in the stencil buffer. This comparison determines whether /// the stencil test passes or fails. /// @@ -207,9 +207,9 @@ struct SFML_GRAPHICS_API StencilMode /// buffer and not the color buffer during a draw. The written stencil buffer /// value can then be used in subsequent draws as a masking region. /// -/// In SFML, a stencil mode can be specified every time you draw a sf::Drawable -/// object to a render target. It is part of the sf::RenderStates compound -/// that is passed to the member function sf::RenderTarget::draw(). +/// In SFML, a stencil mode can be specified every time you draw a `sf::Drawable` +/// object to a render target. It is part of the `sf::RenderStates` compound +/// that is passed to the member function `sf::RenderTarget::draw()`. /// /// Usage example: /// \code @@ -251,6 +251,6 @@ struct SFML_GRAPHICS_API StencilMode /// window.draw(right, sf::StencilMode{sf::StencilComparison::NotEqual, sf::StencilUpdateOperation::Keep, 1, 0xFF, false}); /// \endcode /// -/// \see sf::RenderStates, sf::RenderTarget +/// \see `sf::RenderStates`, `sf::RenderTarget` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Text.hpp b/include/SFML/Graphics/Text.hpp index 9707c6642..28b694163 100644 --- a/include/SFML/Graphics/Text.hpp +++ b/include/SFML/Graphics/Text.hpp @@ -95,7 +95,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Set the text's string /// - /// The \a string argument is a sf::String, which can + /// The \a `string` argument is a `sf::String`, which can /// automatically be constructed from standard string types. /// So, the following calls are all valid: /// \code @@ -108,7 +108,7 @@ public: /// /// \param string New string /// - /// \see getString + /// \see `getString` /// //////////////////////////////////////////////////////////// void setString(const String& string); @@ -116,7 +116,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Set the text's font /// - /// The \a font argument refers to a font that must + /// The \a `font` argument refers to a font that must /// exist as long as the text uses it. Indeed, the text /// doesn't store its own copy of the font, but rather keeps /// a pointer to the one that you passed to this function. @@ -125,7 +125,7 @@ public: /// /// \param font New font /// - /// \see getFont + /// \see `getFont` /// //////////////////////////////////////////////////////////// void setFont(const Font& font); @@ -150,7 +150,7 @@ public: /// /// \param size New character size, in pixels /// - /// \see getCharacterSize + /// \see `getCharacterSize` /// //////////////////////////////////////////////////////////// void setCharacterSize(unsigned int size); @@ -164,7 +164,7 @@ public: /// /// \param spacingFactor New line spacing factor /// - /// \see getLineSpacing + /// \see `getLineSpacing` /// //////////////////////////////////////////////////////////// void setLineSpacing(float spacingFactor); @@ -183,7 +183,7 @@ public: /// /// \param spacingFactor New letter spacing factor /// - /// \see getLetterSpacing + /// \see `getLetterSpacing` /// //////////////////////////////////////////////////////////// void setLetterSpacing(float spacingFactor); @@ -192,12 +192,12 @@ public: /// \brief Set the text's style /// /// You can pass a combination of one or more styles, for - /// example sf::Text::Bold | sf::Text::Italic. - /// The default style is sf::Text::Regular. + /// example `sf::Text::Bold | sf::Text::Italic`. + /// The default style is `sf::Text::Regular`. /// /// \param style New style /// - /// \see getStyle + /// \see `getStyle` /// //////////////////////////////////////////////////////////// void setStyle(std::uint32_t style); @@ -211,7 +211,7 @@ public: /// /// \param color New fill color of the text /// - /// \see getFillColor + /// \see `getFillColor` /// //////////////////////////////////////////////////////////// void setFillColor(Color color); @@ -223,7 +223,7 @@ public: /// /// \param color New outline color of the text /// - /// \see getOutlineColor + /// \see `getOutlineColor` /// //////////////////////////////////////////////////////////// void setOutlineColor(Color color); @@ -238,7 +238,7 @@ public: /// /// \param thickness New outline thickness, in pixels /// - /// \see getOutlineThickness + /// \see `getOutlineThickness` /// //////////////////////////////////////////////////////////// void setOutlineThickness(float thickness); @@ -246,7 +246,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Get the text's string /// - /// The returned string is a sf::String, which can automatically + /// The returned string is a `sf::String`, which can automatically /// be converted to standard string types. So, the following /// lines of code are all valid: /// \code @@ -257,7 +257,7 @@ public: /// /// \return Text's string /// - /// \see setString + /// \see `setString` /// //////////////////////////////////////////////////////////// [[nodiscard]] const String& getString() const; @@ -270,7 +270,7 @@ public: /// /// \return Reference to the text's font /// - /// \see setFont + /// \see `setFont` /// //////////////////////////////////////////////////////////// [[nodiscard]] const Font& getFont() const; @@ -280,7 +280,7 @@ public: /// /// \return Size of the characters, in pixels /// - /// \see setCharacterSize + /// \see `setCharacterSize` /// //////////////////////////////////////////////////////////// [[nodiscard]] unsigned int getCharacterSize() const; @@ -290,7 +290,7 @@ public: /// /// \return Size of the letter spacing factor /// - /// \see setLetterSpacing + /// \see `setLetterSpacing` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getLetterSpacing() const; @@ -300,7 +300,7 @@ public: /// /// \return Size of the line spacing factor /// - /// \see setLineSpacing + /// \see `setLineSpacing` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getLineSpacing() const; @@ -310,7 +310,7 @@ public: /// /// \return Text's style /// - /// \see setStyle + /// \see `setStyle` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::uint32_t getStyle() const; @@ -320,7 +320,7 @@ public: /// /// \return Fill color of the text /// - /// \see setFillColor + /// \see `setFillColor` /// //////////////////////////////////////////////////////////// [[nodiscard]] Color getFillColor() const; @@ -330,7 +330,7 @@ public: /// /// \return Outline color of the text /// - /// \see setOutlineColor + /// \see `setOutlineColor` /// //////////////////////////////////////////////////////////// [[nodiscard]] Color getOutlineColor() const; @@ -340,19 +340,19 @@ public: /// /// \return Outline thickness of the text, in pixels /// - /// \see setOutlineThickness + /// \see `setOutlineThickness` /// //////////////////////////////////////////////////////////// [[nodiscard]] float getOutlineThickness() const; //////////////////////////////////////////////////////////// - /// \brief Return the position of the \a index-th character + /// \brief Return the position of the \a `index`-th character /// /// This function computes the visual position of a character /// from its index in the string. The returned position is /// in global coordinates (translation, rotation, scale and /// origin are applied). - /// If \a index is out of range, the position of the end of + /// If \a `index` is out of range, the position of the end of /// the string is returned. /// /// \param index Index of the character @@ -435,10 +435,10 @@ private: /// \class sf::Text /// \ingroup graphics /// -/// sf::Text is a drawable class that allows to easily display +/// `sf::Text` is a drawable class that allows to easily display /// some text with custom style and color on a render target. /// -/// It inherits all the functions from sf::Transformable: +/// It inherits all the functions from `sf::Transformable`: /// position, rotation, scale, origin. It also adds text-specific /// properties such as the font to use, the character size, /// the font style (bold, italic, underlined and strike through), the @@ -448,23 +448,23 @@ private: /// graphical size of the text, or to get the global position /// of a given character. /// -/// sf::Text works in combination with the sf::Font class, which +/// `sf::Text` works in combination with the `sf::Font` class, which /// loads and provides the glyphs (visual characters) of a given font. /// -/// The separation of sf::Font and sf::Text allows more flexibility -/// and better performances: indeed a sf::Font is a heavy resource, +/// The separation of `sf::Font` and `sf::Text` allows more flexibility +/// and better performances: indeed a `sf::Font` is a heavy resource, /// and any operation on it is slow (often too slow for real-time -/// applications). On the other side, a sf::Text is a lightweight -/// object which can combine the glyphs data and metrics of a sf::Font +/// applications). On the other side, a `sf::Text` is a lightweight +/// object which can combine the glyphs data and metrics of a `sf::Font` /// to display any text on a render target. /// -/// It is important to note that the sf::Text instance doesn't +/// It is important to note that the `sf::Text` instance doesn't /// copy the font that it uses, it only keeps a reference to it. -/// Thus, a sf::Font must not be destructed while it is -/// used by a sf::Text (i.e. never write a function that -/// uses a local sf::Font instance for creating a text). +/// Thus, a `sf::Font` must not be destructed while it is +/// used by a `sf::Text` (i.e. never write a function that +/// uses a local `sf::Font` instance for creating a text). /// -/// See also the note on coordinates and undistorted rendering in sf::Transformable. +/// See also the note on coordinates and undistorted rendering in `sf::Transformable`. /// /// Usage example: /// \code @@ -481,6 +481,6 @@ private: /// window.draw(text); /// \endcode /// -/// \see sf::Font, sf::Transformable +/// \see `sf::Font`, `sf::Transformable` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Texture.hpp b/include/SFML/Graphics/Texture.hpp index 2964d854e..c4df70317 100644 --- a/include/SFML/Graphics/Texture.hpp +++ b/include/SFML/Graphics/Texture.hpp @@ -60,7 +60,7 @@ public: /// /// Creates a texture with width 0 and height 0. /// - /// \see resize + /// \see `resize` /// //////////////////////////////////////////////////////////// Texture(); @@ -104,11 +104,11 @@ public: /// driver and can be retrieved with the getMaximumSize function. /// /// \param filename Path of the image file to load - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream, loadFromImage + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream`, `loadFromImage` /// //////////////////////////////////////////////////////////// explicit Texture(const std::filesystem::path& filename, bool sRgb = false); @@ -116,22 +116,22 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the texture from a sub-rectangle of a file on disk /// - /// The \a area argument can be used to load only a sub-rectangle + /// The \a `area` argument can be used to load only a sub-rectangle /// of the whole image. If you want the entire image then leave - /// the default value (which is an empty IntRect). - /// If the \a area rectangle crosses the bounds of the image, it + /// the default value (which is an empty `IntRect`). + /// If the \a `area` rectangle crosses the bounds of the image, it /// is adjusted to fit the image size. /// /// The maximum size for a texture depends on the graphics - /// driver and can be retrieved with the getMaximumSize function. + /// driver and can be retrieved with the `getMaximumSize` function. /// /// \param filename Path of the image file to load - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// \param area Area of the image to load /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream, loadFromImage + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream`, `loadFromImage` /// //////////////////////////////////////////////////////////// Texture(const std::filesystem::path& filename, bool sRgb, const IntRect& area); @@ -140,15 +140,15 @@ public: /// \brief Construct the texture from a file in memory /// /// The maximum size for a texture depends on the graphics - /// driver and can be retrieved with the getMaximumSize function. + /// driver and can be retrieved with the `getMaximumSize` function. /// /// \param data Pointer to the file data in memory /// \param size Size of the data to load, in bytes - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream, loadFromImage + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream`, `loadFromImage` /// //////////////////////////////////////////////////////////// Texture(const void* data, std::size_t size, bool sRgb = false); @@ -156,23 +156,23 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the texture from a sub-rectangle of a file in memory /// - /// The \a area argument can be used to load only a sub-rectangle + /// The \a `area` argument can be used to load only a sub-rectangle /// of the whole image. If you want the entire image then leave - /// the default value (which is an empty IntRect). - /// If the \a area rectangle crosses the bounds of the image, it + /// the default value (which is an empty `IntRect`). + /// If the \a `area` rectangle crosses the bounds of the image, it /// is adjusted to fit the image size. /// /// The maximum size for a texture depends on the graphics - /// driver and can be retrieved with the getMaximumSize function. + /// driver and can be retrieved with the `getMaximumSize` function. /// /// \param data Pointer to the file data in memory /// \param size Size of the data to load, in bytes - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// \param area Area of the image to load /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream, loadFromImage + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream`, `loadFromImage` /// //////////////////////////////////////////////////////////// Texture(const void* data, std::size_t size, bool sRgb, const IntRect& area); @@ -181,14 +181,14 @@ public: /// \brief Construct the texture from a custom stream /// /// The maximum size for a texture depends on the graphics - /// driver and can be retrieved with the getMaximumSize function. + /// driver and can be retrieved with the `getMaximumSize` function. /// /// \param stream Source stream to read from - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream, loadFromImage + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream`, `loadFromImage` /// //////////////////////////////////////////////////////////// explicit Texture(InputStream& stream, bool sRgb = false); @@ -196,22 +196,22 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the texture from a sub-rectangle of a custom stream /// - /// The \a area argument can be used to load only a sub-rectangle + /// The \a `area` argument can be used to load only a sub-rectangle /// of the whole image. If you want the entire image then leave - /// the default value (which is an empty IntRect). - /// If the \a area rectangle crosses the bounds of the image, it + /// the default value (which is an empty `IntRect`). + /// If the \a `area` rectangle crosses the bounds of the image, it /// is adjusted to fit the image size. /// /// The maximum size for a texture depends on the graphics - /// driver and can be retrieved with the getMaximumSize function. + /// driver and can be retrieved with the `getMaximumSize` function. /// /// \param stream Source stream to read from - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// \param area Area of the image to load /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream, loadFromImage + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream`, `loadFromImage` /// //////////////////////////////////////////////////////////// Texture(InputStream& stream, bool sRgb, const IntRect& area); @@ -220,14 +220,14 @@ public: /// \brief Construct the texture from an image /// /// The maximum size for a texture depends on the graphics - /// driver and can be retrieved with the getMaximumSize function. + /// driver and can be retrieved with the `getMaximumSize` function. /// /// \param image Image to load into the texture - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream, loadFromImage + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream`, `loadFromImage` /// //////////////////////////////////////////////////////////// explicit Texture(const Image& image, bool sRgb = false); @@ -235,21 +235,21 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the texture from a sub-rectangle of an image /// - /// The \a area argument is used to load only a sub-rectangle + /// The \a `area` argument is used to load only a sub-rectangle /// of the whole image. - /// If the \a area rectangle crosses the bounds of the image, it + /// If the \a `area` rectangle crosses the bounds of the image, it /// is adjusted to fit the image size. /// /// The maximum size for a texture depends on the graphics - /// driver and can be retrieved with the getMaximumSize function. + /// driver and can be retrieved with the `getMaximumSize` function. /// /// \param image Image to load into the texture - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// \param area Area of the image to load /// /// \throws `sf::Exception` if loading was unsuccessful /// - /// \see loadFromFile, loadFromMemory, loadFromStream, loadFromImage + /// \see `loadFromFile`, `loadFromMemory`, `loadFromStream`, `loadFromImage` /// //////////////////////////////////////////////////////////// Texture(const Image& image, bool sRgb, const IntRect& area); @@ -258,7 +258,7 @@ public: /// \brief Construct the texture with a given size /// /// \param size Width and height of the texture - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// /// \throws `sf::Exception` if construction was unsuccessful /// @@ -271,9 +271,9 @@ public: /// If this function fails, the texture is left unchanged. /// /// \param size Width and height of the texture - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// - /// \return True if resizing was successful, false if it failed + /// \return `true` if resizing was successful, `false` if it failed /// //////////////////////////////////////////////////////////// [[nodiscard]] bool resize(Vector2u size, bool sRgb = false); @@ -281,24 +281,24 @@ public: //////////////////////////////////////////////////////////// /// \brief Load the texture from a file on disk /// - /// The \a area argument can be used to load only a sub-rectangle + /// The \a `area` argument can be used to load only a sub-rectangle /// of the whole image. If you want the entire image then leave - /// the default value (which is an empty IntRect). - /// If the \a area rectangle crosses the bounds of the image, it + /// the default value (which is an empty `IntRect`). + /// If the \a `area` rectangle crosses the bounds of the image, it /// is adjusted to fit the image size. /// /// The maximum size for a texture depends on the graphics - /// driver and can be retrieved with the getMaximumSize function. + /// driver and can be retrieved with the `getMaximumSize` function. /// /// If this function fails, the texture is left unchanged. /// /// \param filename Path of the image file to load - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// \param area Area of the image to load /// - /// \return True if loading was successful, false if it failed + /// \return `true` if loading was successful, `false` if it failed /// - /// \see loadFromMemory, loadFromStream, loadFromImage + /// \see `loadFromMemory`, `loadFromStream`, `loadFromImage` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromFile(const std::filesystem::path& filename, bool sRgb = false, const IntRect& area = {}); @@ -306,25 +306,25 @@ public: //////////////////////////////////////////////////////////// /// \brief Load the texture from a file in memory /// - /// The \a area argument can be used to load only a sub-rectangle + /// The \a `area` argument can be used to load only a sub-rectangle /// of the whole image. If you want the entire image then leave - /// the default value (which is an empty IntRect). - /// If the \a area rectangle crosses the bounds of the image, it + /// the default value (which is an empty `IntRect`). + /// If the \a `area` rectangle crosses the bounds of the image, it /// is adjusted to fit the image size. /// /// The maximum size for a texture depends on the graphics - /// driver and can be retrieved with the getMaximumSize function. + /// driver and can be retrieved with the `getMaximumSize` function. /// /// If this function fails, the texture is left unchanged. /// /// \param data Pointer to the file data in memory /// \param size Size of the data to load, in bytes - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// \param area Area of the image to load /// - /// \return True if loading was successful, false if it failed + /// \return `true` if loading was successful, `false` if it failed /// - /// \see loadFromFile, loadFromStream, loadFromImage + /// \see `loadFromFile`, `loadFromStream`, `loadFromImage` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromMemory(const void* data, std::size_t size, bool sRgb = false, const IntRect& area = {}); @@ -332,24 +332,24 @@ public: //////////////////////////////////////////////////////////// /// \brief Load the texture from a custom stream /// - /// The \a area argument can be used to load only a sub-rectangle + /// The \a `area` argument can be used to load only a sub-rectangle /// of the whole image. If you want the entire image then leave - /// the default value (which is an empty IntRect). - /// If the \a area rectangle crosses the bounds of the image, it + /// the default value (which is an empty `IntRect`). + /// If the \a `area` rectangle crosses the bounds of the image, it /// is adjusted to fit the image size. /// /// The maximum size for a texture depends on the graphics - /// driver and can be retrieved with the getMaximumSize function. + /// driver and can be retrieved with the `getMaximumSize` function. /// /// If this function fails, the texture is left unchanged. /// /// \param stream Source stream to read from - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// \param area Area of the image to load /// - /// \return True if loading was successful, false if it failed + /// \return `true` if loading was successful, `false` if it failed /// - /// \see loadFromFile, loadFromMemory, loadFromImage + /// \see `loadFromFile`, `loadFromMemory`, `loadFromImage` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromStream(InputStream& stream, bool sRgb = false, const IntRect& area = {}); @@ -357,24 +357,24 @@ public: //////////////////////////////////////////////////////////// /// \brief Load the texture from an image /// - /// The \a area argument can be used to load only a sub-rectangle + /// The \a `area` argument can be used to load only a sub-rectangle /// of the whole image. If you want the entire image then leave - /// the default value (which is an empty IntRect). - /// If the \a area rectangle crosses the bounds of the image, it + /// the default value (which is an empty `IntRect`). + /// If the \a `area` rectangle crosses the bounds of the image, it /// is adjusted to fit the image size. /// /// The maximum size for a texture depends on the graphics - /// driver and can be retrieved with the getMaximumSize function. + /// driver and can be retrieved with the `getMaximumSize` function. /// /// If this function fails, the texture is left unchanged. /// /// \param image Image to load into the texture - /// \param sRgb True to enable sRGB conversion, false to disable it + /// \param sRgb `true` to enable sRGB conversion, `false` to disable it /// \param area Area of the image to load /// - /// \return True if loading was successful, false if it failed + /// \return `true` if loading was successful, `false` if it failed /// - /// \see loadFromFile, loadFromMemory + /// \see `loadFromFile`, `loadFromMemory` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool loadFromImage(const Image& image, bool sRgb = false, const IntRect& area = {}); @@ -397,7 +397,7 @@ public: /// /// \return Image containing the texture's pixels /// - /// \see loadFromImage + /// \see `loadFromImage` /// //////////////////////////////////////////////////////////// [[nodiscard]] Image copyToImage() const; @@ -405,15 +405,15 @@ public: //////////////////////////////////////////////////////////// /// \brief Update the whole texture from an array of pixels /// - /// The \a pixel array is assumed to have the same size as - /// the \a area rectangle, and to contain 32-bits RGBA pixels. + /// The pixel array is assumed to have the same size as + /// the \a `area` rectangle, and to contain 32-bits RGBA pixels. /// /// No additional check is performed on the size of the pixel /// array. Passing invalid arguments will lead to an undefined /// behavior. /// - /// This function does nothing if \a pixels is null or if the - /// texture was not previously created. + /// This function does nothing if \a `pixels` is `nullptr` + /// or if the texture was not previously created. /// /// \param pixels Array of pixels to copy to the texture /// @@ -423,18 +423,18 @@ public: //////////////////////////////////////////////////////////// /// \brief Update a part of the texture from an array of pixels /// - /// The size of the \a pixel array must match the \a width and - /// \a height arguments, and it must contain 32-bits RGBA pixels. + /// The size of the pixel array must match the \a `size` argument, + /// and it must contain 32-bits RGBA pixels. /// /// No additional check is performed on the size of the pixel /// array or the bounds of the area to update. Passing invalid /// arguments will lead to an undefined behavior. /// - /// This function does nothing if \a pixels is null or if the + /// This function does nothing if \a `pixels` is null or if the /// texture was not previously created. /// /// \param pixels Array of pixels to copy to the texture - /// \param size Width and height of the pixel region contained in \a pixels + /// \param size Width and height of the pixel region contained in \a `pixels` /// \param dest Coordinates of the destination position /// //////////////////////////////////////////////////////////// @@ -560,9 +560,9 @@ public: /// you should leave it disabled. /// The smooth filter is disabled by default. /// - /// \param smooth True to enable smoothing, false to disable it + /// \param smooth `true` to enable smoothing, `false` to disable it /// - /// \see isSmooth + /// \see `isSmooth` /// //////////////////////////////////////////////////////////// void setSmooth(bool smooth); @@ -570,9 +570,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Tell whether the smooth filter is enabled or not /// - /// \return True if smoothing is enabled, false if it is disabled + /// \return `true` if smoothing is enabled, `false` if it is disabled /// - /// \see setSmooth + /// \see `setSmooth` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isSmooth() const; @@ -580,9 +580,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Tell whether the texture source is converted from sRGB or not /// - /// \return True if the texture source is converted from sRGB, false if not + /// \return `true` if the texture source is converted from sRGB, `false` if not /// - /// \see setSrgb + /// \see `setSrgb` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isSrgb() const; @@ -604,9 +604,9 @@ public: /// dimensions (such as 256x128). /// Repeating is disabled by default. /// - /// \param repeated True to repeat the texture, false to disable repeating + /// \param repeated `true` to repeat the texture, `false` to disable repeating /// - /// \see isRepeated + /// \see `isRepeated` /// //////////////////////////////////////////////////////////// void setRepeated(bool repeated); @@ -614,9 +614,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Tell whether the texture is repeated or not /// - /// \return True if repeat mode is enabled, false if it is disabled + /// \return `true` if repeat mode is enabled, `false` if it is disabled /// - /// \see setRepeated + /// \see `setRepeated` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isRepeated() const; @@ -636,12 +636,12 @@ public: /// /// Mipmap generation relies on the necessary OpenGL extension being /// available. If it is unavailable or generation fails due to another - /// reason, this function will return false. Mipmap data is only valid from + /// reason, this function will return `false`. Mipmap data is only valid from /// the time it is generated until the next time the base level image is /// modified, at which point this function will have to be called again to /// regenerate it. /// - /// \return True if mipmap generation was successful, false if unsuccessful + /// \return `true` if mipmap generation was successful, `false` if unsuccessful /// //////////////////////////////////////////////////////////// [[nodiscard]] bool generateMipmap(); @@ -671,7 +671,7 @@ public: /// /// This function is not part of the graphics API, it mustn't be /// used when drawing SFML entities. It must be used only if you - /// mix sf::Texture with OpenGL code. + /// mix `sf::Texture` with OpenGL code. /// /// \code /// sf::Texture t1, t2; @@ -684,7 +684,7 @@ public: /// // draw OpenGL stuff that use no texture... /// \endcode /// - /// The \a coordinateType argument controls how texture + /// The \a `coordinateType` argument controls how texture /// coordinates will be interpreted. If Normalized (the default), they /// must be in range [0 .. 1], which is the default way of handling /// texture coordinates with OpenGL. If Pixels, they must be given @@ -771,18 +771,18 @@ SFML_GRAPHICS_API void swap(Texture& left, Texture& right) noexcept; /// \class sf::Texture /// \ingroup graphics /// -/// sf::Texture stores pixels that can be drawn, with a sprite +/// `sf::Texture` stores pixels that can be drawn, with a sprite /// for example. A texture lives in the graphics card memory, /// therefore it is very fast to draw a texture to a render target, /// or copy a render target to a texture (the graphics card can /// access both directly). /// /// Being stored in the graphics card memory has some drawbacks. -/// A texture cannot be manipulated as freely as a sf::Image, +/// A texture cannot be manipulated as freely as a `sf::Image`, /// you need to prepare the pixels first and then upload them -/// to the texture in a single operation (see Texture::update). +/// to the texture in a single operation (see `Texture::update`). /// -/// sf::Texture makes it easy to convert from/to sf::Image, but +/// `sf::Texture` makes it easy to convert from/to `sf::Image`, but /// keep in mind that these calls require transfers between /// the graphics card and the central memory, therefore they are /// slow operations. @@ -792,8 +792,8 @@ SFML_GRAPHICS_API void swap(Texture& left, Texture& right) noexcept; /// so that you don't need an image first for the most common cases. /// However, if you want to perform some modifications on the pixels /// before creating the final texture, you can load your file to a -/// sf::Image, do whatever you need with the pixels, and then call -/// Texture(const Image&). +/// `sf::Image`, do whatever you need with the pixels, and then call +/// `Texture(const Image&)`. /// /// Since they live in the graphics card memory, the pixels of a texture /// cannot be accessed without a slow copy first. And they cannot be @@ -802,10 +802,10 @@ SFML_GRAPHICS_API void swap(Texture& left, Texture& right) noexcept; /// store the collision information separately, for example in an array /// of booleans. /// -/// Like sf::Image, sf::Texture can handle a unique internal +/// Like `sf::Image`, `sf::Texture` can handle a unique internal /// representation of pixels, which is RGBA 32 bits. This means /// that a pixel must be composed of 8 bit red, green, blue and -/// alpha channels -- just like a sf::Color. +/// alpha channels -- just like a `sf::Color`. /// /// When providing texture data from an image file or memory, it can /// either be stored in a linear color space or an sRGB color space. @@ -860,8 +860,8 @@ SFML_GRAPHICS_API void swap(Texture& left, Texture& right) noexcept; /// /// \endcode /// -/// Like sf::Shader that can be used as a raw OpenGL shader, -/// sf::Texture can also be used directly as a raw texture for +/// Like `sf::Shader` that can be used as a raw OpenGL shader, +/// `sf::Texture` can also be used directly as a raw texture for /// custom OpenGL geometry. /// \code /// sf::Texture::bind(&texture); @@ -869,6 +869,6 @@ SFML_GRAPHICS_API void swap(Texture& left, Texture& right) noexcept; /// sf::Texture::bind(nullptr); /// \endcode /// -/// \see sf::Sprite, sf::Image, sf::RenderTexture +/// \see `sf::Sprite`, `sf::Image`, `sf::RenderTexture` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Transform.hpp b/include/SFML/Graphics/Transform.hpp index 32eb5a53d..57e9d48bd 100644 --- a/include/SFML/Graphics/Transform.hpp +++ b/include/SFML/Graphics/Transform.hpp @@ -135,8 +135,8 @@ public: /// \brief Combine the current transform with another one /// /// The result is a transform that is equivalent to applying - /// \a transform followed by *this. Mathematically, it is - /// equivalent to a matrix multiplication (*this) * transform. + /// \a `transform` followed by `*this`. Mathematically, it is + /// equivalent to a matrix multiplication `(*this) * transform`. /// /// These two statements are equivalent: /// \code @@ -146,7 +146,7 @@ public: /// /// \param transform Transform to combine with this transform /// - /// \return Reference to *this + /// \return Reference to `*this` /// //////////////////////////////////////////////////////////// constexpr Transform& combine(const Transform& transform); @@ -154,7 +154,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Combine the current transform with a translation /// - /// This function returns a reference to *this, so that calls + /// This function returns a reference to `*this`, so that calls /// can be chained. /// \code /// sf::Transform transform; @@ -163,9 +163,9 @@ public: /// /// \param offset Translation offset to apply /// - /// \return Reference to *this + /// \return Reference to `*this` /// - /// \see rotate, scale + /// \see `rotate`, `scale` /// //////////////////////////////////////////////////////////// constexpr Transform& translate(Vector2f offset); @@ -173,7 +173,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Combine the current transform with a rotation /// - /// This function returns a reference to *this, so that calls + /// This function returns a reference to `*this`, so that calls /// can be chained. /// \code /// sf::Transform transform; @@ -182,9 +182,9 @@ public: /// /// \param angle Rotation angle /// - /// \return Reference to *this + /// \return Reference to `*this` /// - /// \see translate, scale + /// \see `translate`, `scale` /// //////////////////////////////////////////////////////////// SFML_GRAPHICS_API Transform& rotate(Angle angle); @@ -195,9 +195,9 @@ public: /// The center of rotation is provided for convenience as a second /// argument, so that you can build rotations around arbitrary points /// more easily (and efficiently) than the usual - /// translate(-center).rotate(angle).translate(center). + /// `translate(-center).rotate(angle).translate(center)`. /// - /// This function returns a reference to *this, so that calls + /// This function returns a reference to `*this`, so that calls /// can be chained. /// \code /// sf::Transform transform; @@ -207,9 +207,9 @@ public: /// \param angle Rotation angle /// \param center Center of rotation /// - /// \return Reference to *this + /// \return Reference to `*this` /// - /// \see translate, scale + /// \see `translate`, `scale` /// //////////////////////////////////////////////////////////// SFML_GRAPHICS_API Transform& rotate(Angle angle, Vector2f center); @@ -217,7 +217,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Combine the current transform with a scaling /// - /// This function returns a reference to *this, so that calls + /// This function returns a reference to `*this`, so that calls /// can be chained. /// \code /// sf::Transform transform; @@ -226,9 +226,9 @@ public: /// /// \param factors Scaling factors /// - /// \return Reference to *this + /// \return Reference to `*this` /// - /// \see translate, rotate + /// \see `translate`, `rotate` /// //////////////////////////////////////////////////////////// constexpr Transform& scale(Vector2f factors); @@ -239,9 +239,9 @@ public: /// The center of scaling is provided for convenience as a second /// argument, so that you can build scaling around arbitrary points /// more easily (and efficiently) than the usual - /// translate(-center).scale(factors).translate(center). + /// `translate(-center).scale(factors).translate(center)`. /// - /// This function returns a reference to *this, so that calls + /// This function returns a reference to `*this`, so that calls /// can be chained. /// \code /// sf::Transform transform; @@ -251,9 +251,9 @@ public: /// \param factors Scaling factors /// \param center Center of scaling /// - /// \return Reference to *this + /// \return Reference to `*this` /// - /// \see translate, rotate + /// \see `translate`, `rotate` /// //////////////////////////////////////////////////////////// constexpr Transform& scale(Vector2f factors, Vector2f center); @@ -277,10 +277,10 @@ private: }; //////////////////////////////////////////////////////////// -/// \relates sf::Transform -/// \brief Overload of binary operator * to combine two transforms +/// \relates `sf::Transform` +/// \brief Overload of binary `operator*` to combine two transforms /// -/// This call is equivalent to calling Transform(left).combine(right). +/// This call is equivalent to calling `Transform(left).combine(right)`. /// /// \param left Left operand (the first transform) /// \param right Right operand (the second transform) @@ -291,10 +291,10 @@ private: [[nodiscard]] constexpr Transform operator*(const Transform& left, const Transform& right); //////////////////////////////////////////////////////////// -/// \relates sf::Transform -/// \brief Overload of binary operator *= to combine two transforms +/// \relates `sf::Transform` +/// \brief Overload of binary `operator*=` to combine two transforms /// -/// This call is equivalent to calling left.combine(right). +/// This call is equivalent to calling `left.combine(right)`. /// /// \param left Left operand (the first transform) /// \param right Right operand (the second transform) @@ -305,10 +305,10 @@ private: constexpr Transform& operator*=(Transform& left, const Transform& right); //////////////////////////////////////////////////////////// -/// \relates sf::Transform -/// \brief Overload of binary operator * to transform a point +/// \relates `sf::Transform` +/// \brief Overload of binary `operator*` to transform a point /// -/// This call is equivalent to calling left.transformPoint(right). +/// This call is equivalent to calling `left.transformPoint(right)`. /// /// \param left Left operand (the transform) /// \param right Right operand (the point to transform) @@ -319,8 +319,8 @@ constexpr Transform& operator*=(Transform& left, const Transform& right); [[nodiscard]] constexpr Vector2f operator*(const Transform& left, Vector2f right); //////////////////////////////////////////////////////////// -/// \relates sf::Transform -/// \brief Overload of binary operator == to compare two transforms +/// \relates `sf::Transform` +/// \brief Overload of binary `operator==` to compare two transforms /// /// Performs an element-wise comparison of the elements of the /// left transform with the elements of the right transform. @@ -328,21 +328,21 @@ constexpr Transform& operator*=(Transform& left, const Transform& right); /// \param left Left operand (the first transform) /// \param right Right operand (the second transform) /// -/// \return true if the transforms are equal, false otherwise +/// \return `true` if the transforms are equal, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator==(const Transform& left, const Transform& right); //////////////////////////////////////////////////////////// -/// \relates sf::Transform -/// \brief Overload of binary operator != to compare two transforms +/// \relates `sf::Transform` +/// \brief Overload of binary `operator!=` to compare two transforms /// -/// This call is equivalent to !(left == right). +/// This call is equivalent to `!(left == right)`. /// /// \param left Left operand (the first transform) /// \param right Right operand (the second transform) /// -/// \return true if the transforms are not equal, false otherwise +/// \return `true` if the transforms are not equal, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator!=(const Transform& left, const Transform& right); @@ -356,7 +356,7 @@ constexpr Transform& operator*=(Transform& left, const Transform& right); /// \class sf::Transform /// \ingroup graphics /// -/// A sf::Transform specifies how to translate, rotate, scale, +/// A `sf::Transform` specifies how to translate, rotate, scale, /// shear, project, whatever things. In mathematical terms, it defines /// how to transform a coordinate system into another. /// @@ -388,6 +388,6 @@ constexpr Transform& operator*=(Transform& left, const Transform& right); /// sf::FloatRect rect = transform.transformRect(sf::FloatRect({0, 0}, {10, 100})); /// \endcode /// -/// \see sf::Transformable, sf::RenderStates +/// \see `sf::Transformable`, `sf::RenderStates` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Transformable.hpp b/include/SFML/Graphics/Transformable.hpp index 0641b4bfe..a6d7be65b 100644 --- a/include/SFML/Graphics/Transformable.hpp +++ b/include/SFML/Graphics/Transformable.hpp @@ -64,7 +64,7 @@ public: /// /// \param position New position /// - /// \see move, getPosition + /// \see `move`, `getPosition` /// //////////////////////////////////////////////////////////// void setPosition(Vector2f position); @@ -78,7 +78,7 @@ public: /// /// \param angle New rotation /// - /// \see rotate, getRotation + /// \see `rotate`, `getRotation` /// //////////////////////////////////////////////////////////// void setRotation(Angle angle); @@ -92,7 +92,7 @@ public: /// /// \param factors New scale factors /// - /// \see scale, getScale + /// \see `scale`, `getScale` /// //////////////////////////////////////////////////////////// void setScale(Vector2f factors); @@ -109,7 +109,7 @@ public: /// /// \param origin New origin /// - /// \see getOrigin + /// \see `getOrigin` /// //////////////////////////////////////////////////////////// void setOrigin(Vector2f origin); @@ -119,7 +119,7 @@ public: /// /// \return Current position /// - /// \see setPosition + /// \see `setPosition` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2f getPosition() const; @@ -131,7 +131,7 @@ public: /// /// \return Current rotation /// - /// \see setRotation + /// \see `setRotation` /// //////////////////////////////////////////////////////////// [[nodiscard]] Angle getRotation() const; @@ -141,7 +141,7 @@ public: /// /// \return Current scale factors /// - /// \see setScale + /// \see `setScale` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2f getScale() const; @@ -151,7 +151,7 @@ public: /// /// \return Current origin /// - /// \see setOrigin + /// \see `setOrigin` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2f getOrigin() const; @@ -160,7 +160,7 @@ public: /// \brief Move the object by a given offset /// /// This function adds to the current position of the object, - /// unlike setPosition which overwrites it. + /// unlike `setPosition` which overwrites it. /// Thus, it is equivalent to the following code: /// \code /// object.setPosition(object.getPosition() + offset); @@ -168,7 +168,7 @@ public: /// /// \param offset Offset /// - /// \see setPosition + /// \see `setPosition` /// //////////////////////////////////////////////////////////// void move(Vector2f offset); @@ -177,7 +177,7 @@ public: /// \brief Rotate the object /// /// This function adds to the current rotation of the object, - /// unlike setRotation which overwrites it. + /// unlike `setRotation` which overwrites it. /// Thus, it is equivalent to the following code: /// \code /// object.setRotation(object.getRotation() + angle); @@ -192,7 +192,7 @@ public: /// \brief Scale the object /// /// This function multiplies the current scale of the object, - /// unlike setScale which overwrites it. + /// unlike `setScale` which overwrites it. /// Thus, it is equivalent to the following code: /// \code /// sf::Vector2f scale = object.getScale(); @@ -201,7 +201,7 @@ public: /// /// \param factor Scale factors /// - /// \see setScale + /// \see `setScale` /// //////////////////////////////////////////////////////////// void scale(Vector2f factor); @@ -211,7 +211,7 @@ public: /// /// \return Transform combining the position/rotation/scale/origin of the object /// - /// \see getInverseTransform + /// \see `getInverseTransform` /// //////////////////////////////////////////////////////////// [[nodiscard]] const Transform& getTransform() const; @@ -221,7 +221,7 @@ public: /// /// \return Inverse of the combined transformations applied to the object /// - /// \see getTransform + /// \see `getTransform` /// //////////////////////////////////////////////////////////// [[nodiscard]] const Transform& getInverseTransform() const; @@ -247,9 +247,9 @@ private: /// \class sf::Transformable /// \ingroup graphics /// -/// This class is provided for convenience, on top of sf::Transform. +/// This class is provided for convenience, on top of `sf::Transform`. /// -/// sf::Transform, as a low-level class, offers a great level of +/// `sf::Transform`, as a low-level class, offers a great level of /// flexibility but it is not always convenient to manage. Indeed, /// one can easily combine any kind of operation, such as a translation /// followed by a rotation followed by a scaling, but once the result @@ -261,13 +261,13 @@ private: /// rotation. This is a tedious operation, and it requires to store /// all the individual components of the final transform. /// -/// That's exactly what sf::Transformable was written for: it hides +/// That's exactly what `sf::Transformable` was written for: it hides /// these variables and the composed transform behind an easy to use /// interface. You can set or get any of the individual components /// without worrying about the others. It also provides the composed -/// transform (as a sf::Transform), and keeps it up-to-date. +/// transform (as a `sf::Transform`), and keeps it up-to-date. /// -/// In addition to the position, rotation and scale, sf::Transformable +/// In addition to the position, rotation and scale, `sf::Transformable` /// provides an "origin" component, which represents the local origin /// of the three other components. Let's take an example with a 10x10 /// pixels sprite. By default, the sprite is positioned/rotated/scaled @@ -277,13 +277,13 @@ private: /// we set the origin to (10, 10), it will be transformed around its /// bottom-right corner. /// -/// To keep the sf::Transformable class simple, there's only one +/// To keep the `sf::Transformable` class simple, there's only one /// origin for all the components. You cannot position the sprite /// relatively to its top-left corner while rotating it around its -/// center, for example. To do such things, use sf::Transform directly. +/// center, for example. To do such things, use `sf::Transform` directly. /// -/// sf::Transformable can be used as a base class. It is often -/// combined with sf::Drawable -- that's what SFML's sprites, +/// `sf::Transformable` can be used as a base class. It is often +/// combined with `sf::Drawable` -- that's what SFML's sprites, /// texts and shapes do. /// \code /// class MyEntity : public sf::Transformable, public sf::Drawable @@ -328,13 +328,13 @@ private: /// such as sprites or texts when rendering. While this allows transitions /// like slow movements or rotations to appear smoothly, it can lead to /// unwanted results in some cases, for example blurred or distorted objects. -/// In order to render a sf::Drawable object pixel-perfectly, make sure +/// In order to render a `sf::Drawable` object pixel-perfectly, make sure /// the involved coordinates allow a 1:1 mapping of pixels in the window /// to texels (pixels in the texture). More specifically, this means: /// * The object's position, origin and scale have no fractional part /// * The object's and the view's rotation are a multiple of 90 degrees /// * The view's center and size have no fractional part /// -/// \see sf::Transform +/// \see `sf::Transform` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Vertex.hpp b/include/SFML/Graphics/Vertex.hpp index 4246fed70..f9fe52288 100644 --- a/include/SFML/Graphics/Vertex.hpp +++ b/include/SFML/Graphics/Vertex.hpp @@ -113,10 +113,10 @@ struct Vertex /// \endcode /// /// -/// Note: although texture coordinates are supposed to be an integer +/// Note: Although texture coordinates are supposed to be an integer /// amount of pixels, their type is float because of some buggy graphics /// drivers that are not able to process integer coordinates correctly. /// -/// \see sf::VertexArray +/// \see `sf::VertexArray` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/VertexArray.hpp b/include/SFML/Graphics/VertexArray.hpp index a715c52f9..0be21acdd 100644 --- a/include/SFML/Graphics/VertexArray.hpp +++ b/include/SFML/Graphics/VertexArray.hpp @@ -79,15 +79,15 @@ public: //////////////////////////////////////////////////////////// /// \brief Get a read-write access to a vertex by its index /// - /// This function doesn't check \a index, it must be in range - /// [0, getVertexCount() - 1]. The behavior is undefined + /// This function doesn't check \a `index`, it must be in range + /// [0, `getVertexCount()` - 1]. The behavior is undefined /// otherwise. /// /// \param index Index of the vertex to get /// /// \return Reference to the index-th vertex /// - /// \see getVertexCount + /// \see `getVertexCount` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vertex& operator[](std::size_t index); @@ -95,15 +95,15 @@ public: //////////////////////////////////////////////////////////// /// \brief Get a read-only access to a vertex by its index /// - /// This function doesn't check \a index, it must be in range - /// [0, getVertexCount() - 1]. The behavior is undefined + /// This function doesn't check \a `index`, it must be in range + /// [0, `getVertexCount()` - 1]. The behavior is undefined /// otherwise. /// /// \param index Index of the vertex to get /// /// \return Const reference to the index-th vertex /// - /// \see getVertexCount + /// \see `getVertexCount` /// //////////////////////////////////////////////////////////// [[nodiscard]] const Vertex& operator[](std::size_t index) const; @@ -122,10 +122,10 @@ public: //////////////////////////////////////////////////////////// /// \brief Resize the vertex array /// - /// If \a vertexCount is greater than the current size, the previous + /// If \a `vertexCount` is greater than the current size, the previous /// vertices are kept and new (default-constructed) vertices are /// added. - /// If \a vertexCount is less than the current size, existing vertices + /// If \a `vertexCount` is less than the current size, existing vertices /// are removed from the array. /// /// \param vertexCount New size of the array (number of vertices) @@ -149,7 +149,7 @@ public: /// \li As points /// \li As lines /// \li As triangles - /// The default primitive type is sf::PrimitiveType::Points. + /// The default primitive type is `sf::PrimitiveType::Points`. /// /// \param type Type of primitive /// @@ -199,10 +199,10 @@ private: /// \class sf::VertexArray /// \ingroup graphics /// -/// sf::VertexArray is a very simple wrapper around a dynamic +/// `sf::VertexArray` is a very simple wrapper around a dynamic /// array of vertices and a primitives type. /// -/// It inherits sf::Drawable, but unlike other drawables it +/// It inherits `sf::Drawable`, but unlike other drawables it /// is not transformable. /// /// Example: @@ -216,6 +216,6 @@ private: /// window.draw(lines); /// \endcode /// -/// \see sf::Vertex +/// \see `sf::Vertex` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/VertexBuffer.hpp b/include/SFML/Graphics/VertexBuffer.hpp index b03342b47..deb1c97b4 100644 --- a/include/SFML/Graphics/VertexBuffer.hpp +++ b/include/SFML/Graphics/VertexBuffer.hpp @@ -76,7 +76,7 @@ public: VertexBuffer() = default; //////////////////////////////////////////////////////////// - /// \brief Construct a VertexBuffer with a specific PrimitiveType + /// \brief Construct a `VertexBuffer` with a specific `PrimitiveType` /// /// Creates an empty vertex buffer and sets its primitive type to \p type. /// @@ -86,7 +86,7 @@ public: explicit VertexBuffer(PrimitiveType type); //////////////////////////////////////////////////////////// - /// \brief Construct a VertexBuffer with a specific usage specifier + /// \brief Construct a `VertexBuffer` with a specific usage specifier /// /// Creates an empty vertex buffer and sets its usage to \p usage. /// @@ -96,7 +96,7 @@ public: explicit VertexBuffer(Usage usage); //////////////////////////////////////////////////////////// - /// \brief Construct a VertexBuffer with a specific PrimitiveType and usage specifier + /// \brief Construct a `VertexBuffer` with a specific `PrimitiveType` and usage specifier /// /// Creates an empty vertex buffer and sets its primitive type /// to \p type and usage to \p usage. @@ -125,16 +125,16 @@ public: /// \brief Create the vertex buffer /// /// Creates the vertex buffer and allocates enough graphics - /// memory to hold \p vertexCount vertices. Any previously + /// memory to hold \a `vertexCount` vertices. Any previously /// allocated memory is freed in the process. /// /// In order to deallocate previously allocated memory pass 0 - /// as \p vertexCount. Don't forget to recreate with a non-zero + /// as \a `vertexCount`. Don't forget to recreate with a non-zero /// value when graphics memory should be allocated again. /// /// \param vertexCount Number of vertices worth of memory to allocate /// - /// \return True if creation was successful + /// \return `true` if creation was successful /// //////////////////////////////////////////////////////////// [[nodiscard]] bool create(std::size_t vertexCount); @@ -150,19 +150,19 @@ public: //////////////////////////////////////////////////////////// /// \brief Update the whole buffer from an array of vertices /// - /// The \a vertex array is assumed to have the same size as - /// the \a created buffer. + /// The vertex array is assumed to have the same size as + /// the created buffer. /// /// No additional check is performed on the size of the vertex /// array. Passing invalid arguments will lead to undefined /// behavior. /// - /// This function does nothing if \a vertices is null or if the + /// This function does nothing if \a `vertices` is null or if the /// buffer was not previously created. /// /// \param vertices Array of vertices to copy to the buffer /// - /// \return True if the update was successful + /// \return `true` if the update was successful /// //////////////////////////////////////////////////////////// [[nodiscard]] bool update(const Vertex* vertices); @@ -170,21 +170,21 @@ public: //////////////////////////////////////////////////////////// /// \brief Update a part of the buffer from an array of vertices /// - /// \p offset is specified as the number of vertices to skip + /// \a `offset` is specified as the number of vertices to skip /// from the beginning of the buffer. /// - /// If \p offset is 0 and \p vertexCount is equal to the size of + /// If \a `offset` is 0 and \a `vertexCount` is equal to the size of /// the currently created buffer, its whole contents are replaced. /// - /// If \p offset is 0 and \p vertexCount is greater than the + /// If \a `offset` is 0 and \a `vertexCount` is greater than the /// size of the currently created buffer, a new buffer is created /// containing the vertex data. /// - /// If \p offset is 0 and \p vertexCount is less than the size of + /// If \a `offset` is 0 and \a `vertexCount` is less than the size of /// the currently created buffer, only the corresponding region /// is updated. /// - /// If \p offset is not 0 and \p offset + \p vertexCount is greater + /// If \a `offset` is not 0 and \a `offset` + \a `vertexCount` is greater /// than the size of the currently created buffer, the update fails. /// /// No additional check is performed on the size of the vertex @@ -195,7 +195,7 @@ public: /// \param vertexCount Number of vertices to copy /// \param offset Offset in the buffer to copy to /// - /// \return True if the update was successful + /// \return `true` if the update was successful /// //////////////////////////////////////////////////////////// [[nodiscard]] bool update(const Vertex* vertices, std::size_t vertexCount, unsigned int offset); @@ -205,7 +205,7 @@ public: /// /// \param vertexBuffer Vertex buffer whose contents to copy into this vertex buffer /// - /// \return True if the copy was successful + /// \return `true` if the copy was successful /// //////////////////////////////////////////////////////////// [[nodiscard]] bool update(const VertexBuffer& vertexBuffer); @@ -246,7 +246,7 @@ public: /// This function defines how the vertices must be interpreted /// when it's time to draw them. /// - /// The default primitive type is sf::PrimitiveType::Points. + /// The default primitive type is `sf::PrimitiveType::Points`. /// /// \param type Type of primitive /// @@ -271,7 +271,7 @@ public: /// to be updated with new data for the usage specifier to /// take effect. /// - /// The default usage type is sf::VertexBuffer::Usage::Stream. + /// The default usage type is `sf::VertexBuffer::Usage::Stream`. /// /// \param usage Usage specifier /// @@ -291,7 +291,7 @@ public: /// /// This function is not part of the graphics API, it mustn't be /// used when drawing SFML entities. It must be used only if you - /// mix sf::VertexBuffer with OpenGL code. + /// mix `sf::VertexBuffer` with OpenGL code. /// /// \code /// sf::VertexBuffer vb1, vb2; @@ -313,10 +313,10 @@ public: /// \brief Tell whether or not the system supports vertex buffers /// /// This function should always be called before using - /// the vertex buffer features. If it returns false, then - /// any attempt to use sf::VertexBuffer will fail. + /// the vertex buffer features. If it returns `false`, then + /// any attempt to use `sf::VertexBuffer` will fail. /// - /// \return True if vertex buffers are supported, false otherwise + /// \return `true` if vertex buffers are supported, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] static bool isAvailable(); @@ -356,21 +356,21 @@ SFML_GRAPHICS_API void swap(VertexBuffer& left, VertexBuffer& right) noexcept; /// \class sf::VertexBuffer /// \ingroup graphics /// -/// sf::VertexBuffer is a simple wrapper around a dynamic +/// `sf::VertexBuffer` is a simple wrapper around a dynamic /// buffer of vertices and a primitives type. /// -/// Unlike sf::VertexArray, the vertex data is stored in +/// Unlike `sf::VertexArray`, the vertex data is stored in /// graphics memory. /// /// In situations where a large amount of vertex data would /// have to be transferred from system memory to graphics memory -/// every frame, using sf::VertexBuffer can help. By using a -/// sf::VertexBuffer, data that has not been changed between frames +/// every frame, using `sf::VertexBuffer` can help. By using a +/// `sf::VertexBuffer`, data that has not been changed between frames /// does not have to be re-transferred from system to graphics -/// memory as would be the case with sf::VertexArray. If data transfer +/// memory as would be the case with `sf::VertexArray`. If data transfer /// is a bottleneck, this can lead to performance gains. /// -/// Using sf::VertexBuffer, the user also has the ability to only modify +/// Using `sf::VertexBuffer`, the user also has the ability to only modify /// a portion of the buffer in graphics memory. This way, a large buffer /// can be allocated at the start of the application and only the /// applicable portions of it need to be updated during the course of @@ -395,7 +395,7 @@ SFML_GRAPHICS_API void swap(VertexBuffer& left, VertexBuffer& right) noexcept; /// pending data transfers complete before the vertex buffer is sourced /// by the rendering pipeline. /// -/// It inherits sf::Drawable, but unlike other drawables it +/// It inherits `sf::Drawable`, but unlike other drawables it /// is not transformable. /// /// Example: @@ -409,6 +409,6 @@ SFML_GRAPHICS_API void swap(VertexBuffer& left, VertexBuffer& right) noexcept; /// window.draw(triangles); /// \endcode /// -/// \see sf::Vertex, sf::VertexArray +/// \see `sf::Vertex`, `sf::VertexArray` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/View.hpp b/include/SFML/Graphics/View.hpp index 9dcfc381c..450973f0c 100644 --- a/include/SFML/Graphics/View.hpp +++ b/include/SFML/Graphics/View.hpp @@ -75,7 +75,7 @@ public: /// /// \param center New center /// - /// \see setSize, getCenter + /// \see `setSize`, `getCenter` /// //////////////////////////////////////////////////////////// void setCenter(Vector2f center); @@ -85,7 +85,7 @@ public: /// /// \param size New size /// - /// \see setCenter, getCenter + /// \see `setCenter`, `getCenter` /// //////////////////////////////////////////////////////////// void setSize(Vector2f size); @@ -97,7 +97,7 @@ public: /// /// \param angle New angle /// - /// \see getRotation + /// \see `getRotation` /// //////////////////////////////////////////////////////////// void setRotation(Angle angle); @@ -109,12 +109,12 @@ public: /// view are displayed, expressed as a factor (between 0 and 1) /// of the size of the RenderTarget to which the view is applied. /// For example, a view which takes the left side of the target would - /// be defined with View.setViewport(sf::FloatRect({0.f, 0.f}, {0.5f, 1.f})). + /// be defined with `view.setViewport(sf::FloatRect({0.f, 0.f}, {0.5f, 1.f}))`. /// By default, a view has a viewport which covers the entire target. /// /// \param viewport New viewport rectangle /// - /// \see getViewport + /// \see `getViewport` /// //////////////////////////////////////////////////////////// void setViewport(const FloatRect& viewport); @@ -129,7 +129,7 @@ public: /// not be modified by draw or clear operations. /// For example, a scissor rectangle which only allows modifications /// to the right side of the target would be defined - /// with View.setScissor(sf::FloatRect({0.5f, 0.f}, {0.5f, 1.f})). + /// with `view.setScissor(sf::FloatRect({0.5f, 0.f}, {0.5f, 1.f}))`. /// By default, a view has a scissor rectangle which allows /// modifications to the entire target. This is equivalent to /// disabling the scissor test entirely. Passing the default @@ -138,7 +138,7 @@ public: /// /// \param scissor New scissor rectangle /// - /// \see getScissor + /// \see `getScissor` /// //////////////////////////////////////////////////////////// void setScissor(const FloatRect& scissor); @@ -148,7 +148,7 @@ public: /// /// \return Center of the view /// - /// \see getSize, setCenter + /// \see `getSize`, `setCenter` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2f getCenter() const; @@ -158,7 +158,7 @@ public: /// /// \return Size of the view /// - /// \see getCenter, setSize + /// \see `getCenter`, `setSize` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2f getSize() const; @@ -168,7 +168,7 @@ public: /// /// \return Rotation angle of the view /// - /// \see setRotation + /// \see `setRotation` /// //////////////////////////////////////////////////////////// [[nodiscard]] Angle getRotation() const; @@ -178,7 +178,7 @@ public: /// /// \return Viewport rectangle, expressed as a factor of the target size /// - /// \see setViewport + /// \see `setViewport` /// //////////////////////////////////////////////////////////// [[nodiscard]] const FloatRect& getViewport() const; @@ -188,7 +188,7 @@ public: /// /// \return Scissor rectangle, expressed as a factor of the target size /// - /// \see setScissor + /// \see `setScissor` /// //////////////////////////////////////////////////////////// [[nodiscard]] const FloatRect& getScissor() const; @@ -198,7 +198,7 @@ public: /// /// \param offset Move offset /// - /// \see setCenter, rotate, zoom + /// \see `setCenter`, `rotate`, `zoom` /// //////////////////////////////////////////////////////////// void move(Vector2f offset); @@ -208,7 +208,7 @@ public: /// /// \param angle Angle to rotate /// - /// \see setRotation, move, zoom + /// \see `setRotation`, `move`, `zoom` /// //////////////////////////////////////////////////////////// void rotate(Angle angle); @@ -225,7 +225,7 @@ public: /// /// \param factor Zoom factor to apply /// - /// \see setSize, move, rotate + /// \see `setSize`, `move`, `rotate` /// //////////////////////////////////////////////////////////// void zoom(float factor); @@ -237,7 +237,7 @@ public: /// /// \return Projection transform defining the view /// - /// \see getInverseTransform + /// \see `getInverseTransform` /// //////////////////////////////////////////////////////////// [[nodiscard]] const Transform& getTransform() const; @@ -249,7 +249,7 @@ public: /// /// \return Inverse of the projection transform defining the view /// - /// \see getTransform + /// \see `getTransform` /// //////////////////////////////////////////////////////////// [[nodiscard]] const Transform& getInverseTransform() const; @@ -276,7 +276,7 @@ private: /// \class sf::View /// \ingroup graphics /// -/// sf::View defines a camera in the 2D scene. This is a +/// `sf::View` defines a camera in the 2D scene. This is a /// very powerful concept: you can scroll, rotate or zoom /// the entire scene without altering the way that your /// drawable objects are drawn. @@ -350,8 +350,8 @@ private: /// window.draw(someText); /// \endcode /// -/// See also the note on coordinates and undistorted rendering in sf::Transformable. +/// See also the note on coordinates and undistorted rendering in `sf::Transformable`. /// -/// \see sf::RenderWindow, sf::RenderTexture +/// \see `sf::RenderWindow`, `sf::RenderTexture` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Network/Ftp.hpp b/include/SFML/Network/Ftp.hpp index fcdc60172..ee1d316f4 100644 --- a/include/SFML/Network/Ftp.hpp +++ b/include/SFML/Network/Ftp.hpp @@ -151,7 +151,7 @@ public: /// This function is defined for convenience, it is /// equivalent to testing if the status code is < 400. /// - /// \return True if the status is a success, false if it is a failure + /// \return `true` if the status is a success, `false` if it is a failure /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isOk() const; @@ -213,7 +213,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Specialization of FTP response returning a - /// filename listing + /// file name listing //////////////////////////////////////////////////////////// class SFML_NETWORK_API ListingResponse : public Response { @@ -278,7 +278,7 @@ public: /// This function tries to connect to the server so it may take /// a while to complete, especially if the server is not /// reachable. To avoid blocking your application for too long, - /// you can use a timeout. The default value, Time::Zero, means that the + /// you can use a timeout. The default value, `Time::Zero`, means that the /// system timeout will be used (which is usually pretty long). /// /// \param server Name or address of the FTP server to connect to @@ -287,7 +287,7 @@ public: /// /// \return Server response to the request /// - /// \see disconnect + /// \see `disconnect` /// //////////////////////////////////////////////////////////// [[nodiscard]] Response connect(IpAddress server, unsigned short port = 21, Time timeout = Time::Zero); @@ -297,7 +297,7 @@ public: /// /// \return Server response to the request /// - /// \see connect + /// \see `connect` /// //////////////////////////////////////////////////////////// [[nodiscard]] Response disconnect(); @@ -346,7 +346,7 @@ public: /// /// \return Server response to the request /// - /// \see getDirectoryListing, changeDirectory, parentDirectory + /// \see `getDirectoryListing`, `changeDirectory`, `parentDirectory` /// //////////////////////////////////////////////////////////// [[nodiscard]] DirectoryResponse getWorkingDirectory(); @@ -356,14 +356,14 @@ public: /// /// This function retrieves the sub-directories and files /// contained in the given directory. It is not recursive. - /// The \a directory parameter is relative to the current + /// The \a `directory` parameter is relative to the current /// working directory. /// /// \param directory Directory to list /// /// \return Server response to the request /// - /// \see getWorkingDirectory, changeDirectory, parentDirectory + /// \see `getWorkingDirectory`, `changeDirectory`, `parentDirectory` /// //////////////////////////////////////////////////////////// [[nodiscard]] ListingResponse getDirectoryListing(const std::string& directory = ""); @@ -377,7 +377,7 @@ public: /// /// \return Server response to the request /// - /// \see getWorkingDirectory, getDirectoryListing, parentDirectory + /// \see `getWorkingDirectory`, `getDirectoryListing`, `parentDirectory` /// //////////////////////////////////////////////////////////// [[nodiscard]] Response changeDirectory(const std::string& directory); @@ -387,7 +387,7 @@ public: /// /// \return Server response to the request /// - /// \see getWorkingDirectory, getDirectoryListing, changeDirectory + /// \see `getWorkingDirectory`, `getDirectoryListing`, `changeDirectory` /// //////////////////////////////////////////////////////////// [[nodiscard]] Response parentDirectory(); @@ -402,7 +402,7 @@ public: /// /// \return Server response to the request /// - /// \see deleteDirectory + /// \see `deleteDirectory` /// //////////////////////////////////////////////////////////// [[nodiscard]] Response createDirectory(const std::string& name); @@ -419,7 +419,7 @@ public: /// /// \return Server response to the request /// - /// \see createDirectory + /// \see `createDirectory` /// //////////////////////////////////////////////////////////// [[nodiscard]] Response deleteDirectory(const std::string& name); @@ -427,7 +427,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Rename an existing file /// - /// The filenames must be relative to the current working + /// The file names must be relative to the current working /// directory. /// /// \param file File to rename @@ -435,7 +435,7 @@ public: /// /// \return Server response to the request /// - /// \see deleteFile + /// \see `deleteFile` /// //////////////////////////////////////////////////////////// [[nodiscard]] Response renameFile(const std::filesystem::path& file, const std::filesystem::path& newName); @@ -452,7 +452,7 @@ public: /// /// \return Server response to the request /// - /// \see renameFile + /// \see `renameFile` /// //////////////////////////////////////////////////////////// [[nodiscard]] Response deleteFile(const std::filesystem::path& name); @@ -460,21 +460,21 @@ public: //////////////////////////////////////////////////////////// /// \brief Download a file from the server /// - /// The filename of the distant file is relative to the + /// The file name of the distant file is relative to the /// current working directory of the server, and the local /// destination path is relative to the current directory /// of your application. - /// If a file with the same filename as the distant file + /// If a file with the same file name as the distant file /// already exists in the local destination path, it will /// be overwritten. /// - /// \param remoteFile Filename of the distant file to download + /// \param remoteFile File name of the distant file to download /// \param localPath The directory in which to put the file on the local computer /// \param mode Transfer mode /// /// \return Server response to the request /// - /// \see upload + /// \see `upload` /// //////////////////////////////////////////////////////////// [[nodiscard]] Response download(const std::filesystem::path& remoteFile, @@ -495,11 +495,11 @@ public: /// \param localFile Path of the local file to upload /// \param remotePath The directory in which to put the file on the server /// \param mode Transfer mode - /// \param append Pass true to append to or false to overwrite the remote file if it already exists + /// \param append Pass `true` to append to or `false` to overwrite the remote file if it already exists /// /// \return Server response to the request /// - /// \see download + /// \see `download` /// //////////////////////////////////////////////////////////// [[nodiscard]] Response upload(const std::filesystem::path& localFile, @@ -511,11 +511,11 @@ public: /// \brief Send a command to the FTP server /// /// While the most often used commands are provided as member - /// functions in the sf::Ftp class, this method can be used + /// functions in the `sf::Ftp` class, this method can be used /// to send any FTP command to the server. If the command /// requires one or more parameters, they can be specified - /// in \a parameter. If the server returns information, you - /// can extract it from the response using Response::getMessage(). + /// in \a `parameter`. If the server returns information, you + /// can extract it from the response using `Response::getMessage()`. /// /// \param command Command to send /// \param parameter Command parameter @@ -530,7 +530,7 @@ private: /// \brief Receive a response from the server /// /// This function must be called after each call to - /// sendCommand that expects a response. + /// `sendCommand` that expects a response. /// /// \return Server response to the request /// @@ -560,7 +560,7 @@ private: /// \class sf::Ftp /// \ingroup network /// -/// sf::Ftp is a very simple FTP client that allows you +/// `sf::Ftp` is a very simple FTP client that allows you /// to communicate with a FTP server. The FTP protocol allows /// you to manipulate a remote file system (list files, /// upload, download, create, remove, ...). @@ -573,11 +573,11 @@ private: /// /// Every command returns a FTP response, which contains the /// status code as well as a message from the server. Some -/// commands such as getWorkingDirectory() and getDirectoryListing() +/// commands such as `getWorkingDirectory()` and `getDirectoryListing()` /// return additional data, and use a class derived from -/// sf::Ftp::Response to provide this data. The most often used +/// `sf::Ftp::Response` to provide this data. The most often used /// commands are directly provided as member functions, but it is -/// also possible to use specific commands with the sendCommand() function. +/// also possible to use specific commands with the `sendCommand()` function. /// /// Note that response statuses >= 1000 are not part of the FTP standard, /// they are generated by SFML when an internal error occurs. diff --git a/include/SFML/Network/Http.hpp b/include/SFML/Network/Http.hpp index 9c03415d6..0380a9670 100644 --- a/include/SFML/Network/Http.hpp +++ b/include/SFML/Network/Http.hpp @@ -102,7 +102,7 @@ public: /// /// See the Method enumeration for a complete list of all /// the available methods. - /// The method is Http::Request::Method::Get by default. + /// The method is `Http::Request::Method::Get` by default. /// /// \param method Method to use for the request /// @@ -165,7 +165,7 @@ public: /// /// \param field Name of the field to test /// - /// \return True if the field exists, false otherwise + /// \return `true` if the field exists, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] bool hasField(const std::string& field) const; @@ -236,7 +236,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Get the value of a field /// - /// If the field \a field is not found in the response header, + /// If the field \a `field` is not found in the response header, /// the empty string is returned. This function uses /// case-insensitive comparisons. /// @@ -265,7 +265,7 @@ public: /// /// \return Major HTTP version number /// - /// \see getMinorHttpVersion + /// \see `getMinorHttpVersion` /// //////////////////////////////////////////////////////////// [[nodiscard]] unsigned int getMajorHttpVersion() const; @@ -275,7 +275,7 @@ public: /// /// \return Minor HTTP version number /// - /// \see getMajorHttpVersion + /// \see `getMajorHttpVersion` /// //////////////////////////////////////////////////////////// [[nodiscard]] unsigned int getMinorHttpVersion() const; @@ -300,7 +300,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the header from a response string /// - /// This function is used by Http to build the response + /// This function is used by `Http` to build the response /// of a request. /// /// \param data Content of the response to parse @@ -312,7 +312,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Read values passed in the answer header /// - /// This function is used by Http to extract values passed + /// This function is used by `Http` to extract values passed /// in the response. /// /// \param in String stream containing the header values @@ -344,7 +344,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the HTTP client with the target host /// - /// This is equivalent to calling setHost(host, port). + /// This is equivalent to calling `setHost(host, port)`. /// The port has a default value of 0, which means that the /// HTTP client will use the right port according to the /// protocol used (80 for HTTP). You should leave it like @@ -389,13 +389,13 @@ public: //////////////////////////////////////////////////////////// /// \brief Send a HTTP request and return the server's response. /// - /// You must have a valid host before sending a request (see setHost). + /// You must have a valid host before sending a request (see `setHost`). /// Any missing mandatory header field in the request will be added /// with an appropriate value. /// Warning: this function waits for the server's response and may /// not return instantly; use a thread if you don't want to block your /// application, or use a timeout to limit the time to wait. A value - /// of Time::Zero means that the client will use the system default timeout + /// of `Time::Zero` means that the client will use the system default timeout /// (which is usually pretty long). /// /// \param request Request to send @@ -423,32 +423,32 @@ private: /// \class sf::Http /// \ingroup network /// -/// sf::Http is a very simple HTTP client that allows you +/// `sf::Http` is a very simple HTTP client that allows you /// to communicate with a web server. You can retrieve /// web pages, send data to an interactive resource, /// download a remote file, etc. The HTTPS protocol is /// not supported. /// /// The HTTP client is split into 3 classes: -/// \li sf::Http::Request -/// \li sf::Http::Response -/// \li sf::Http +/// \li `sf::Http::Request` +/// \li `sf::Http::Response` +/// \li `sf::Http` /// -/// sf::Http::Request builds the request that will be +/// `sf::Http::Request` builds the request that will be /// sent to the server. A request is made of: /// \li a method (what you want to do) /// \li a target URI (usually the name of the web page or file) /// \li one or more header fields (options that you can pass to the server) /// \li an optional body (for POST requests) /// -/// sf::Http::Response parse the response from the web server +/// `sf::Http::Response` parse the response from the web server /// and provides getters to read them. The response contains: /// \li a status code /// \li header fields (that may be answers to the ones that you requested) /// \li a body, which contains the contents of the requested resource /// -/// sf::Http provides a simple function, SendRequest, to send a -/// sf::Http::Request and return the corresponding sf::Http::Response +/// `sf::Http` provides a simple function, SendRequest, to send a +/// `sf::Http::Request` and return the corresponding `sf::Http::Response` /// from the server. /// /// Usage example: diff --git a/include/SFML/Network/IpAddress.hpp b/include/SFML/Network/IpAddress.hpp index b39790fea..dc2eb41f3 100644 --- a/include/SFML/Network/IpAddress.hpp +++ b/include/SFML/Network/IpAddress.hpp @@ -64,8 +64,8 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the address from 4 bytes /// - /// Calling IpAddress(a, b, c, d) is equivalent to calling - /// IpAddress::resolve("a.b.c.d"), but safer as it doesn't + /// Calling `IpAddress(a, b, c, d)` is equivalent to calling + /// `IpAddress::resolve("a.b.c.d")`, but safer as it doesn't /// have to parse a string to get the address components. /// /// \param byte0 First byte of the address @@ -82,11 +82,11 @@ public: /// This constructor uses the internal representation of /// the address directly. It should be used for optimization /// purposes, and only if you got that representation from - /// IpAddress::toInteger(). + /// `IpAddress::toInteger()`. /// /// \param address 4 bytes of the address packed into a 32-bits integer /// - /// \see toInteger + /// \see `toInteger` /// //////////////////////////////////////////////////////////// explicit IpAddress(std::uint32_t address); @@ -100,7 +100,7 @@ public: /// /// \return String representation of the address /// - /// \see toInteger + /// \see `toInteger` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::string toString() const; @@ -112,11 +112,11 @@ public: /// address, and should be used for optimization purposes only /// (like sending the address through a socket). /// The integer produced by this function can then be converted - /// back to a sf::IpAddress with the proper constructor. + /// back to a `sf::IpAddress` with the proper constructor. /// /// \return 32-bits unsigned integer representation of the address /// - /// \see toString + /// \see `toString` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::uint32_t toInteger() const; @@ -132,7 +132,7 @@ public: /// /// \return Local IP address of the computer on success, `std::nullopt` otherwise /// - /// \see getPublicAddress + /// \see `getPublicAddress` /// //////////////////////////////////////////////////////////// [[nodiscard]] static std::optional getLocalAddress(); @@ -156,7 +156,7 @@ public: /// /// \return Public IP address of the computer on success, `std::nullopt` otherwise /// - /// \see getLocalAddress + /// \see `getLocalAddress` /// //////////////////////////////////////////////////////////// [[nodiscard]] static std::optional getPublicAddress(Time timeout = Time::Zero); @@ -180,73 +180,73 @@ private: }; //////////////////////////////////////////////////////////// -/// \brief Overload of == operator to compare two IP addresses +/// \brief Overload of `operator==` to compare two IP addresses /// /// \param left Left operand (a IP address) /// \param right Right operand (a IP address) /// -/// \return True if both addresses are equal +/// \return `true` if both addresses are equal /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_NETWORK_API bool operator==(IpAddress left, IpAddress right); //////////////////////////////////////////////////////////// -/// \brief Overload of != operator to compare two IP addresses +/// \brief Overload of `operator!=` to compare two IP addresses /// /// \param left Left operand (a IP address) /// \param right Right operand (a IP address) /// -/// \return True if both addresses are different +/// \return `true` if both addresses are different /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_NETWORK_API bool operator!=(IpAddress left, IpAddress right); //////////////////////////////////////////////////////////// -/// \brief Overload of < operator to compare two IP addresses +/// \brief Overload of `operator<` to compare two IP addresses /// /// \param left Left operand (a IP address) /// \param right Right operand (a IP address) /// -/// \return True if \a left is lesser than \a right +/// \return `true` if \a `left` is lesser than \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_NETWORK_API bool operator<(IpAddress left, IpAddress right); //////////////////////////////////////////////////////////// -/// \brief Overload of > operator to compare two IP addresses +/// \brief Overload of `operator>` to compare two IP addresses /// /// \param left Left operand (a IP address) /// \param right Right operand (a IP address) /// -/// \return True if \a left is greater than \a right +/// \return `true` if \a `left` is greater than \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_NETWORK_API bool operator>(IpAddress left, IpAddress right); //////////////////////////////////////////////////////////// -/// \brief Overload of <= operator to compare two IP addresses +/// \brief Overload of `operator<=` to compare two IP addresses /// /// \param left Left operand (a IP address) /// \param right Right operand (a IP address) /// -/// \return True if \a left is lesser or equal than \a right +/// \return `true` if \a left is lesser or equal than \a right /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_NETWORK_API bool operator<=(IpAddress left, IpAddress right); //////////////////////////////////////////////////////////// -/// \brief Overload of >= operator to compare two IP addresses +/// \brief Overload of `operator>=` to compare two IP addresses /// /// \param left Left operand (a IP address) /// \param right Right operand (a IP address) /// -/// \return True if \a left is greater or equal than \a right +/// \return `true` if \a `left` is greater or equal than \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_NETWORK_API bool operator>=(IpAddress left, IpAddress right); //////////////////////////////////////////////////////////// -/// \brief Overload of >> operator to extract an IP address from an input stream +/// \brief Overload of `operator>>` to extract an IP address from an input stream /// /// \param stream Input stream /// \param address IP address to extract @@ -257,7 +257,7 @@ private: SFML_NETWORK_API std::istream& operator>>(std::istream& stream, std::optional& address); //////////////////////////////////////////////////////////// -/// \brief Overload of << operator to print an IP address to an output stream +/// \brief Overload of `operator<<` to print an IP address to an output stream /// /// \param stream Output stream /// \param address IP address to print @@ -274,7 +274,7 @@ SFML_NETWORK_API std::ostream& operator<<(std::ostream& stream, IpAddress addres /// \class sf::IpAddress /// \ingroup network /// -/// sf::IpAddress is a utility class for manipulating network +/// `sf::IpAddress` is a utility class for manipulating network /// addresses. It provides a set a implicit constructors and /// conversion functions to easily build or transform an IP /// address from/to various representations. @@ -291,7 +291,7 @@ SFML_NETWORK_API std::ostream& operator<<(std::ostream& stream, IpAddress addres /// auto a9 = sf::IpAddress::getPublicAddress(); // my address on the internet /// \endcode /// -/// Note that sf::IpAddress currently doesn't support IPv6 +/// Note that `sf::IpAddress` currently doesn't support IPv6 /// nor other types of network addresses. /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Network/Packet.hpp b/include/SFML/Network/Packet.hpp index 2a510b00b..c246a8934 100644 --- a/include/SFML/Network/Packet.hpp +++ b/include/SFML/Network/Packet.hpp @@ -92,8 +92,8 @@ public: /// \param data Pointer to the sequence of bytes to append /// \param sizeInBytes Number of bytes to append /// - /// \see clear - /// \see getReadPosition + /// \see `clear` + /// \see `getReadPosition` /// //////////////////////////////////////////////////////////// void append(const void* data, std::size_t sizeInBytes); @@ -105,7 +105,7 @@ public: /// /// \return The byte offset of the current read position /// - /// \see append + /// \see `append` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::size_t getReadPosition() const; @@ -115,7 +115,7 @@ public: /// /// After calling Clear, the packet is empty. /// - /// \see append + /// \see `append` /// //////////////////////////////////////////////////////////// void clear(); @@ -126,11 +126,11 @@ public: /// Warning: the returned pointer may become invalid after /// you append data to the packet, therefore it should never /// be stored. - /// The return pointer is a null pointer if the packet is empty. + /// The return pointer is a `nullptr` if the packet is empty. /// /// \return Pointer to the data /// - /// \see getDataSize + /// \see `getDataSize` /// //////////////////////////////////////////////////////////// [[nodiscard]] const void* getData() const; @@ -139,11 +139,11 @@ public: /// \brief Get the size of the data contained in the packet /// /// This function returns the number of bytes pointed to by - /// what getData returns. + /// what `getData` returns. /// /// \return Data size, in bytes /// - /// \see getData + /// \see `getData` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::size_t getDataSize() const; @@ -155,9 +155,9 @@ public: /// This function is useful to know if there is some data /// left to be read, without actually reading it. /// - /// \return True if all data was read, false otherwise + /// \return `true` if all data was read, `false` otherwise /// - /// \see operator bool + /// \see `operator` bool /// //////////////////////////////////////////////////////////// [[nodiscard]] bool endOfPacket() const; @@ -195,15 +195,15 @@ public: /// it disallows unwanted implicit conversions to integer or /// pointer types. /// - /// \return True if last data extraction from packet was successful + /// \return `true` if last data extraction from packet was successful /// - /// \see endOfPacket + /// \see `endOfPacket` /// //////////////////////////////////////////////////////////// explicit operator bool() const; //////////////////////////////////////////////////////////// - /// Overload of operator >> to read data from the packet + /// Overload of `operator>>` to read data from the packet /// //////////////////////////////////////////////////////////// Packet& operator>>(bool& data); @@ -284,7 +284,7 @@ public: Packet& operator>>(String& data); //////////////////////////////////////////////////////////// - /// Overload of operator << to write data into the packet + /// Overload of `operator<<` to write data into the packet /// //////////////////////////////////////////////////////////// Packet& operator<<(bool data); @@ -383,7 +383,7 @@ protected: /// /// \return Pointer to the array of bytes to send /// - /// \see onReceive + /// \see `onReceive` /// //////////////////////////////////////////////////////////// virtual const void* onSend(std::size_t& size); @@ -402,7 +402,7 @@ protected: /// \param data Pointer to the received bytes /// \param size Number of bytes /// - /// \see onSend + /// \see `onSend` /// //////////////////////////////////////////////////////////// virtual void onReceive(const void* data, std::size_t size); @@ -415,7 +415,7 @@ private: /// /// \param size Size to check /// - /// \return True if \a size bytes can be read from the packet + /// \return `true` if \a size bytes can be read from the packet /// //////////////////////////////////////////////////////////// bool checkSize(std::size_t size); @@ -438,14 +438,14 @@ private: /// /// Packets provide a safe and easy way to serialize data, /// in order to send it over the network using sockets -/// (sf::TcpSocket, sf::UdpSocket). +/// (`sf::TcpSocket`, `sf::UdpSocket`). /// /// Packets solve 2 fundamental problems that arise when /// transferring data over the network: /// \li data is interpreted correctly according to the endianness /// \li the bounds of the packet are preserved (one send == one receive) /// -/// The sf::Packet class provides both input and output modes. +/// The `sf::Packet` class provides both input and output modes. /// It is designed to follow the behavior of standard C++ streams, /// using operators >> and << to extract and insert data. /// @@ -483,7 +483,7 @@ private: /// } /// \endcode /// -/// Packets have built-in operator >> and << overloads for +/// Packets have built-in `operator>>` and << overloads for /// standard types: /// \li `bool` /// \li fixed-size integer types (`int[8|16|32]_t`, `uint[8|16|32]_t`) @@ -517,7 +517,7 @@ private: /// custom transformations to the data before it is sent, /// and after it is received. This is typically used to /// handle automatic compression or encryption of the data. -/// This is achieved by inheriting from sf::Packet, and overriding +/// This is achieved by inheriting from `sf::Packet`, and overriding /// the onSend and onReceive functions. /// /// Here is an example: @@ -547,6 +547,6 @@ private: /// ... /// \endcode /// -/// \see sf::TcpSocket, sf::UdpSocket +/// \see `sf::TcpSocket`, `sf::UdpSocket` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Network/Socket.hpp b/include/SFML/Network/Socket.hpp index bbb4c1606..cd4bc5523 100644 --- a/include/SFML/Network/Socket.hpp +++ b/include/SFML/Network/Socket.hpp @@ -103,9 +103,9 @@ public: /// available or not. /// By default, all sockets are blocking. /// - /// \param blocking True to set the socket as blocking, false for non-blocking + /// \param blocking `true` to set the socket as blocking, `false` for non-blocking /// - /// \see isBlocking + /// \see `isBlocking` /// //////////////////////////////////////////////////////////// void setBlocking(bool blocking); @@ -113,9 +113,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Tell whether the socket is in blocking or non-blocking mode /// - /// \return True if the socket is blocking, false otherwise + /// \return `true` if the socket is blocking, `false` otherwise /// - /// \see setBlocking + /// \see `setBlocking` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isBlocking() const; @@ -215,7 +215,7 @@ private: /// In non-blocking mode, all the socket functions will /// return immediately. If the socket is not ready to complete /// the requested operation, the function simply returns -/// the proper status code (Socket::Status::NotReady). +/// the proper status code (`Socket::Status::NotReady`). /// /// The default mode, which is blocking, is the one that is /// generally used, in combination with threads or selectors. @@ -224,6 +224,6 @@ private: /// the socket often enough, and cannot afford blocking /// this loop. /// -/// \see sf::TcpListener, sf::TcpSocket, sf::UdpSocket +/// \see `sf::TcpListener`, `sf::TcpSocket`, `sf::UdpSocket` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Network/SocketSelector.hpp b/include/SFML/Network/SocketSelector.hpp index bfdbaeee1..dcd52c5bd 100644 --- a/include/SFML/Network/SocketSelector.hpp +++ b/include/SFML/Network/SocketSelector.hpp @@ -97,7 +97,7 @@ public: /// /// \param socket Reference to the socket to add /// - /// \see remove, clear + /// \see `remove`, `clear` /// //////////////////////////////////////////////////////////// void add(Socket& socket); @@ -110,7 +110,7 @@ public: /// /// \param socket Reference to the socket to remove /// - /// \see add, clear + /// \see `add`, `clear` /// //////////////////////////////////////////////////////////// void remove(Socket& socket); @@ -122,7 +122,7 @@ public: /// removes all the references that the selector has to /// external sockets. /// - /// \see add, remove + /// \see `add`, `remove` /// //////////////////////////////////////////////////////////// void clear(); @@ -132,15 +132,15 @@ public: /// /// This function returns as soon as at least one socket has /// some data available to be received. To know which sockets are - /// ready, use the isReady function. + /// ready, use the `isReady` function. /// If you use a timeout and no socket is ready before the timeout - /// is over, the function returns false. + /// is over, the function returns `false`. /// /// \param timeout Maximum time to wait, (use Time::Zero for infinity) /// - /// \return True if there are sockets ready, false otherwise + /// \return `true` if there are sockets ready, `false` otherwise /// - /// \see isReady + /// \see `isReady` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool wait(Time timeout = Time::Zero); @@ -152,14 +152,14 @@ public: /// which sockets are ready to receive data. If a socket is /// ready, a call to receive will never block because we know /// that there is data available to read. - /// Note that if this function returns true for a TcpListener, + /// Note that if this function returns `true` for a TcpListener, /// this means that it is ready to accept a new connection. /// /// \param socket Socket to test /// - /// \return True if the socket is ready to read, false otherwise + /// \return `true` if the socket is ready to read, `false` otherwise /// - /// \see isReady + /// \see `isReady` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isReady(Socket& socket) const; @@ -189,9 +189,9 @@ private: /// all the sockets. /// /// All types of sockets can be used in a selector: -/// \li sf::TcpListener -/// \li sf::TcpSocket -/// \li sf::UdpSocket +/// \li `sf::TcpListener` +/// \li `sf::TcpSocket` +/// \li `sf::UdpSocket` /// /// A selector doesn't store its own copies of the sockets /// (socket classes are not copyable anyway), it simply keeps @@ -268,6 +268,6 @@ private: /// } /// \endcode /// -/// \see sf::Socket +/// \see `sf::Socket` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Network/TcpListener.hpp b/include/SFML/Network/TcpListener.hpp index 4058b4c28..76623e654 100644 --- a/include/SFML/Network/TcpListener.hpp +++ b/include/SFML/Network/TcpListener.hpp @@ -58,7 +58,7 @@ public: /// /// \return Port to which the socket is bound /// - /// \see listen + /// \see `listen` /// //////////////////////////////////////////////////////////// [[nodiscard]] unsigned short getLocalPort() const; @@ -73,16 +73,16 @@ public: /// function is called, it will stop listening on the old /// port before starting to listen on the new port. /// - /// When providing sf::Socket::AnyPort as port, the listener + /// When providing `sf::Socket::AnyPort` as port, the listener /// will request an available port from the system. - /// The chosen port can be retrieved by calling getLocalPort(). + /// The chosen port can be retrieved by calling `getLocalPort()`. /// /// \param port Port to listen on for incoming connection attempts /// \param address Address of the interface to listen on /// /// \return Status code /// - /// \see accept, close + /// \see `accept`, `close` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status listen(unsigned short port, IpAddress address = IpAddress::Any); @@ -93,7 +93,7 @@ public: /// This function gracefully stops the listener. If the /// socket is not listening, this function has no effect. /// - /// \see listen + /// \see `listen` /// //////////////////////////////////////////////////////////// void close(); @@ -108,7 +108,7 @@ public: /// /// \return Status code /// - /// \see listen + /// \see `listen` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status accept(TcpSocket& socket); @@ -127,18 +127,18 @@ public: /// This is all it can do. /// /// When a new connection is received, you must call accept and -/// the listener returns a new instance of sf::TcpSocket that +/// the listener returns a new instance of `sf::TcpSocket` that /// is properly initialized and can be used to communicate with /// the new client. /// /// Listener sockets are specific to the TCP protocol, /// UDP sockets are connectionless and can therefore communicate /// directly. As a consequence, a listener socket will always -/// return the new connections as sf::TcpSocket instances. +/// return the new connections as `sf::TcpSocket` instances. /// /// A listener is automatically closed on destruction, like all /// other types of socket. However if you want to stop listening -/// before the socket is destroyed, you can call its close() +/// before the socket is destroyed, you can call its `close()` /// function. /// /// Usage example: @@ -161,6 +161,6 @@ public: /// } /// \endcode /// -/// \see sf::TcpSocket, sf::Socket +/// \see `sf::TcpSocket`, `sf::Socket` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Network/TcpSocket.hpp b/include/SFML/Network/TcpSocket.hpp index f77e52e24..b1e8e32d3 100644 --- a/include/SFML/Network/TcpSocket.hpp +++ b/include/SFML/Network/TcpSocket.hpp @@ -66,7 +66,7 @@ public: /// /// \return Port to which the socket is bound /// - /// \see connect, getRemotePort + /// \see `connect`, `getRemotePort` /// //////////////////////////////////////////////////////////// [[nodiscard]] unsigned short getLocalPort() const; @@ -79,7 +79,7 @@ public: /// /// \return Address of the remote peer /// - /// \see getRemotePort + /// \see `getRemotePort` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::optional getRemoteAddress() const; @@ -92,7 +92,7 @@ public: /// /// \return Remote port to which the socket is connected /// - /// \see getRemoteAddress + /// \see `getRemoteAddress` /// //////////////////////////////////////////////////////////// [[nodiscard]] unsigned short getRemotePort() const; @@ -112,7 +112,7 @@ public: /// /// \return Status code /// - /// \see disconnect + /// \see `disconnect` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status connect(IpAddress remoteAddress, unsigned short remotePort, Time timeout = Time::Zero); @@ -123,7 +123,7 @@ public: /// This function gracefully closes the connection. If the /// socket is not connected, this function has no effect. /// - /// \see connect + /// \see `connect` /// //////////////////////////////////////////////////////////// void disconnect(); @@ -132,7 +132,7 @@ public: /// \brief Send raw data to the remote peer /// /// To be able to handle partial sends over non-blocking - /// sockets, use the send(const void*, std::size_t, std::size_t&) + /// sockets, use the `send(const void*, std::size_t, std::size_t&)` /// overload instead. /// This function will fail if the socket is not connected. /// @@ -141,7 +141,7 @@ public: /// /// \return Status code /// - /// \see receive + /// \see `receive` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status send(const void* data, std::size_t size); @@ -157,7 +157,7 @@ public: /// /// \return Status code /// - /// \see receive + /// \see `receive` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status send(const void* data, std::size_t size, std::size_t& sent); @@ -175,7 +175,7 @@ public: /// /// \return Status code /// - /// \see send + /// \see `send` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status receive(void* data, std::size_t size, std::size_t& received); @@ -183,7 +183,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Send a formatted packet of data to the remote peer /// - /// In non-blocking mode, if this function returns sf::Socket::Status::Partial, + /// In non-blocking mode, if this function returns `sf::Socket::Status::Partial`, /// you \em must retry sending the same unmodified packet before sending /// anything else in order to guarantee the packet arrives at the remote /// peer uncorrupted. @@ -193,7 +193,7 @@ public: /// /// \return Status code /// - /// \see receive + /// \see `receive` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status send(Packet& packet); @@ -209,7 +209,7 @@ public: /// /// \return Status code /// - /// \see send + /// \see `send` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status receive(Packet& packet); @@ -252,7 +252,7 @@ private: /// /// When a socket is connected to a remote host, you can /// retrieve information about this host with the -/// getRemoteAddress and getRemotePort functions. You can +/// `getRemoteAddress` and `getRemotePort` functions. You can /// also get the local port to which the socket is bound /// (which is automatically chosen when the socket is connected), /// with the getLocalPort function. @@ -263,9 +263,9 @@ private: /// one call to Send will exactly match one call to Receive /// at the other end of the socket. /// -/// The high-level interface uses packets (see sf::Packet), +/// The high-level interface uses packets (see `sf::Packet`), /// which are easier to use and provide more safety regarding -/// the data that is exchanged. You can look at the sf::Packet +/// the data that is exchanged. You can look at the `sf::Packet` /// class to get more details about how they work. /// /// The socket is automatically disconnected when it is destroyed, @@ -312,6 +312,6 @@ private: /// socket.send(message.c_str(), message.size() + 1); /// \endcode /// -/// \see sf::Socket, sf::UdpSocket, sf::Packet +/// \see `sf::Socket`, `sf::UdpSocket`, `sf::Packet` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Network/UdpSocket.hpp b/include/SFML/Network/UdpSocket.hpp index f8d0e58bf..433ea6b49 100644 --- a/include/SFML/Network/UdpSocket.hpp +++ b/include/SFML/Network/UdpSocket.hpp @@ -69,7 +69,7 @@ public: /// /// \return Port to which the socket is bound /// - /// \see bind + /// \see `bind` /// //////////////////////////////////////////////////////////// [[nodiscard]] unsigned short getLocalPort() const; @@ -80,9 +80,9 @@ public: /// Binding the socket to a port is necessary for being /// able to receive data on that port. /// - /// When providing sf::Socket::AnyPort as port, the listener + /// When providing `sf::Socket::AnyPort` as port, the listener /// will request an available port from the system. - /// The chosen port can be retrieved by calling getLocalPort(). + /// The chosen port can be retrieved by calling `getLocalPort()`. /// /// Since the socket can only be bound to a single port at /// any given moment, if it is already bound when this @@ -94,7 +94,7 @@ public: /// /// \return Status code /// - /// \see unbind, getLocalPort + /// \see `unbind`, `getLocalPort` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status bind(unsigned short port, IpAddress address = IpAddress::Any); @@ -104,11 +104,11 @@ public: /// /// The port that the socket was previously bound to is immediately /// made available to the operating system after this function is called. - /// This means that a subsequent call to bind() will be able to re-bind + /// This means that a subsequent call to `bind()` will be able to re-bind /// the port if no other process has done so in the mean time. /// If the socket is not bound to a port, this function has no effect. /// - /// \see bind + /// \see `bind` /// //////////////////////////////////////////////////////////// void unbind(); @@ -116,8 +116,8 @@ public: //////////////////////////////////////////////////////////// /// \brief Send raw data to a remote peer /// - /// Make sure that \a size is not greater than - /// UdpSocket::MaxDatagramSize, otherwise this function will + /// Make sure that \a `size` is not greater than + /// `UdpSocket::MaxDatagramSize`, otherwise this function will /// fail and no data will be sent. /// /// \param data Pointer to the sequence of bytes to send @@ -127,7 +127,7 @@ public: /// /// \return Status code /// - /// \see receive + /// \see `receive` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status send(const void* data, std::size_t size, IpAddress remoteAddress, unsigned short remotePort); @@ -150,7 +150,7 @@ public: /// /// \return Status code /// - /// \see send + /// \see `send` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status receive(void* data, @@ -163,7 +163,7 @@ public: /// \brief Send a formatted packet of data to a remote peer /// /// Make sure that the packet size is not greater than - /// UdpSocket::MaxDatagramSize, otherwise this function will + /// `UdpSocket::MaxDatagramSize`, otherwise this function will /// fail and no data will be sent. /// /// \param packet Packet to send @@ -172,7 +172,7 @@ public: /// /// \return Status code /// - /// \see receive + /// \see `receive` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status send(Packet& packet, IpAddress remoteAddress, unsigned short remotePort); @@ -189,7 +189,7 @@ public: /// /// \return Status code /// - /// \see send + /// \see `send` /// //////////////////////////////////////////////////////////// [[nodiscard]] Status receive(Packet& packet, std::optional& remoteAddress, unsigned short& remotePort); @@ -230,13 +230,13 @@ private: /// Sending and receiving data can use either the low-level /// or the high-level functions. The low-level functions /// process a raw sequence of bytes, whereas the high-level -/// interface uses packets (see sf::Packet), which are easier +/// interface uses packets (see `sf::Packet`), which are easier /// to use and provide more safety regarding the data that is -/// exchanged. You can look at the sf::Packet class to get +/// exchanged. You can look at the `sf::Packet` class to get /// more details about how they work. /// -/// It is important to note that UdpSocket is unable to send -/// datagrams bigger than MaxDatagramSize. In this case, it +/// It is important to note that `UdpSocket` is unable to send +/// datagrams bigger than `MaxDatagramSize`. In this case, it /// returns an error and doesn't send anything. This applies /// to both raw data and packets. Indeed, even packets are /// unable to split and recompose data, due to the unreliability @@ -288,6 +288,6 @@ private: /// socket.send(message.c_str(), message.size() + 1, sender, port); /// \endcode /// -/// \see sf::Socket, sf::TcpSocket, sf::Packet +/// \see `sf::Socket`, `sf::TcpSocket`, `sf::Packet` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/Angle.hpp b/include/SFML/System/Angle.hpp index 97095c99b..22641e036 100644 --- a/include/SFML/System/Angle.hpp +++ b/include/SFML/System/Angle.hpp @@ -47,7 +47,7 @@ public: /// /// \return Angle in degrees /// - /// \see asRadians + /// \see `asRadians` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr float asDegrees() const; @@ -57,7 +57,7 @@ public: /// /// \return Angle in radians /// - /// \see asDegrees + /// \see `asDegrees` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr float asRadians() const; @@ -67,7 +67,7 @@ public: /// /// Similar to a modulo operation, this returns a copy of the angle /// constrained to the range [-180°, 180°) == [-Pi, Pi). - /// The resulting angle represents a rotation which is equivalent to *this. + /// The resulting angle represents a rotation which is equivalent to `*this`. /// /// The name "signed" originates from the similarity to signed integers: /// @@ -90,7 +90,7 @@ public: /// /// \return Signed angle, wrapped to [-180°, 180°) /// - /// \see wrapUnsigned + /// \see `wrapUnsigned` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Angle wrapSigned() const; @@ -100,7 +100,7 @@ public: /// /// Similar to a modulo operation, this returns a copy of the angle /// constrained to the range [0°, 360°) == [0, Tau) == [0, 2*Pi). - /// The resulting angle represents a rotation which is equivalent to *this. + /// The resulting angle represents a rotation which is equivalent to `*this`. /// /// The name "unsigned" originates from the similarity to unsigned integers: ///
@@ -123,7 +123,7 @@ public: /// /// \return Unsigned angle, wrapped to [0°, 360°) /// - /// \see wrapSigned + /// \see `wrapSigned` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Angle wrapUnsigned() const; @@ -142,7 +142,7 @@ private: /// \brief Construct from a number of radians /// /// This function is internal. To construct angle values, - /// use sf::radians or sf::degrees instead. + /// use `sf::radians` or `sf::degrees` instead. /// /// \param radians Angle in radians /// @@ -162,7 +162,7 @@ private: /// /// \return Angle value constructed from the number of degrees /// -/// \see radians +/// \see `radians` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Angle degrees(float angle); @@ -174,92 +174,92 @@ private: /// /// \return Angle value constructed from the number of radians /// -/// \see degrees +/// \see `degrees` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Angle radians(float angle); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of == operator to compare two angle values +/// \brief Overload of `operator==` to compare two angle values /// \note Does not automatically wrap the angle value /// /// \param left Left operand (an angle) /// \param right Right operand (an angle) /// -/// \return True if both angle values are equal +/// \return `true` if both angle values are equal /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator==(Angle left, Angle right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of != operator to compare two angle values +/// \brief Overload of `operator!=` to compare two angle values /// \note Does not automatically wrap the angle value /// /// \param left Left operand (an angle) /// \param right Right operand (an angle) /// -/// \return True if both angle values are different +/// \return `true` if both angle values are different /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator!=(Angle left, Angle right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of < operator to compare two angle values +/// \brief Overload of `operator<` to compare two angle values /// \note Does not automatically wrap the angle value /// /// \param left Left operand (an angle) /// \param right Right operand (an angle) /// -/// \return True if \a left is less than \a right +/// \return `true` if \a left is less than \a right /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator<(Angle left, Angle right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of > operator to compare two angle values +/// \brief Overload of `operator>` to compare two angle values /// \note Does not automatically wrap the angle value /// /// \param left Left operand (an angle) /// \param right Right operand (an angle) /// -/// \return True if \a left is greater than \a right +/// \return `true` if \a left is greater than \a right /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator>(Angle left, Angle right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of <= operator to compare two angle values +/// \brief Overload of `operator<=` to compare two angle values /// \note Does not automatically wrap the angle value /// /// \param left Left operand (an angle) /// \param right Right operand (an angle) /// -/// \return True if \a left is less than or equal to \a right +/// \return `true` if \a left is less than or equal to \a right /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator<=(Angle left, Angle right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of >= operator to compare two angle values +/// \brief Overload of `operator>=` to compare two angle values /// \note Does not automatically wrap the angle value /// /// \param left Left operand (an angle) /// \param right Right operand (an angle) /// -/// \return True if \a left is greater than or equal to \a right +/// \return `true` if \a left is greater than or equal to \a right /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator>=(Angle left, Angle right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of unary - operator to negate an angle value. +/// \brief Overload of unary `operator-` to negate an angle value. /// /// Represents a rotation in the opposite direction. /// @@ -272,7 +272,7 @@ private: //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of binary + operator to add two angle values +/// \brief Overload of binary `operator+` to add two angle values /// /// \param left Left operand (an angle) /// \param right Right operand (an angle) @@ -284,7 +284,7 @@ private: //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of binary += operator to add/assign two angle values +/// \brief Overload of binary `operator+=` to add/assign two angle values /// /// \param left Left operand (an angle) /// \param right Right operand (an angle) @@ -296,7 +296,7 @@ constexpr Angle& operator+=(Angle& left, Angle right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of binary - operator to subtract two angle values +/// \brief Overload of binary `operator-` to subtract two angle values /// /// \param left Left operand (an angle) /// \param right Right operand (an angle) @@ -308,7 +308,7 @@ constexpr Angle& operator+=(Angle& left, Angle right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of binary -= operator to subtract/assign two angle values +/// \brief Overload of binary `operator-=` to subtract/assign two angle values /// /// \param left Left operand (an angle) /// \param right Right operand (an angle) @@ -320,79 +320,79 @@ constexpr Angle& operator-=(Angle& left, Angle right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of binary * operator to scale an angle value +/// \brief Overload of binary `operator*` to scale an angle value /// /// \param left Left operand (an angle) /// \param right Right operand (a number) /// -/// \return \a left multiplied by \a right +/// \return \a `left` multiplied by \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Angle operator*(Angle left, float right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of binary * operator to scale an angle value +/// \brief Overload of binary `operator*` to scale an angle value /// /// \param left Left operand (a number) /// \param right Right operand (an angle) /// -/// \return \a left multiplied by \a right +/// \return \a `left` multiplied by \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Angle operator*(float left, Angle right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of binary *= operator to scale/assign an angle value +/// \brief Overload of binary `operator*=` to scale/assign an angle value /// /// \param left Left operand (an angle) /// \param right Right operand (a number) /// -/// \return \a left multiplied by \a right +/// \return \a `left` multiplied by \a `right` /// //////////////////////////////////////////////////////////// constexpr Angle& operator*=(Angle& left, float right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of binary / operator to scale an angle value +/// \brief Overload of binary `operator/` to scale an angle value /// /// \param left Left operand (an angle) /// \param right Right operand (a number) /// -/// \return \a left divided by \a right +/// \return \a `left` divided by \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Angle operator/(Angle left, float right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of binary /= operator to scale/assign an angle value +/// \brief Overload of binary `operator/=` to scale/assign an angle value /// /// \param left Left operand (an angle) /// \param right Right operand (a number) /// -/// \return \a left divided by \a right +/// \return \a `left` divided by \a `right` /// //////////////////////////////////////////////////////////// constexpr Angle& operator/=(Angle& left, float right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of binary / operator to compute the ratio of two angle values +/// \brief Overload of binary `operator/` to compute the ratio of two angle values /// /// \param left Left operand (an angle) /// \param right Right operand (an angle) /// -/// \return \a left divided by \a right +/// \return \a `left` divided by \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr float operator/(Angle left, Angle right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of binary % operator to compute modulo of an angle value. +/// \brief Overload of binary `operator%` to compute modulo of an angle value. /// /// Right hand angle must be greater than zero. /// @@ -405,19 +405,19 @@ constexpr Angle& operator/=(Angle& left, float right); /// \param left Left operand (an angle) /// \param right Right operand (an angle) /// -/// \return \a left modulo \a right +/// \return \a `left` modulo \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Angle operator%(Angle left, Angle right); //////////////////////////////////////////////////////////// /// \relates Angle -/// \brief Overload of binary %= operator to compute/assign remainder of an angle value +/// \brief Overload of binary `operator%=` to compute/assign remainder of an angle value /// /// \param left Left operand (an angle) /// \param right Right operand (an angle) /// -/// \return \a left modulo \a right +/// \return \a `left` modulo \a `right` /// //////////////////////////////////////////////////////////// constexpr Angle& operator%=(Angle& left, Angle right); @@ -426,45 +426,45 @@ namespace Literals { //////////////////////////////////////////////////////////// -/// \relates sf::Angle -/// \brief User defined literal for angles in degrees, e.g. 10.5_deg +/// \relates `sf::Angle` +/// \brief User defined literal for angles in degrees, e.g. `10.5_deg` /// /// \param angle Angle in degrees /// -/// \return \a Angle +/// \return Angle /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Angle operator""_deg(long double angle); //////////////////////////////////////////////////////////// -/// \relates sf::Angle -/// \brief User defined literal for angles in degrees, e.g. 90_deg +/// \relates `sf::Angle` +/// \brief User defined literal for angles in degrees, e.g. `90_deg` /// /// \param angle Angle in degrees /// -/// \return \a Angle +/// \return Angle /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Angle operator""_deg(unsigned long long int angle); //////////////////////////////////////////////////////////// -/// \relates sf::Angle -/// \brief User defined literal for angles in radians, e.g. 0.1_rad +/// \relates `sf::Angle` +/// \brief User defined literal for angles in radians, e.g. `0.1_rad` /// /// \param angle Angle in radians /// -/// \return \a Angle +/// \return Angle /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Angle operator""_rad(long double angle); //////////////////////////////////////////////////////////// -/// \relates sf::Angle -/// \brief User defined literal for angles in radians, e.g. 2_rad +/// \relates `sf::Angle` +/// \brief User defined literal for angles in radians, e.g. `2_rad` /// /// \param angle Angle in radians /// -/// \return \a Angle +/// \return Angle /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Angle operator""_rad(unsigned long long int angle); @@ -479,7 +479,7 @@ namespace Literals /// \class sf::Angle /// \ingroup system /// -/// sf::Angle encapsulates an angle value in a flexible way. +/// `sf::Angle` encapsulates an angle value in a flexible way. /// It allows for defining an angle value either as a number /// of degrees or radians. It also works the other way /// around. You can read an angle value as either a number diff --git a/include/SFML/System/Clock.hpp b/include/SFML/System/Clock.hpp index 9ddddbbb4..3eca84c25 100644 --- a/include/SFML/System/Clock.hpp +++ b/include/SFML/System/Clock.hpp @@ -46,12 +46,12 @@ namespace priv //////////////////////////////////////////////////////////// /// \brief Chooses a monotonic clock of highest resolution /// -/// The high_resolution_clock is usually an alias for other -/// clocks: steady_clock or system_clock, whichever has a +/// The `high_resolution_clock` is usually an alias for other +/// clocks: `steady_clock` or `system_clock`, whichever has a /// higher precision. /// -/// sf::Clock, however, is aimed towards monotonic time -/// measurements and so system_clock could never be a choice +/// `sf::Clock`, however, is aimed towards monotonic time +/// measurements and so `system_clock` could never be a choice /// as its subject to discontinuous jumps in the system time /// (e.g., if the system administrator manually changes /// the clock), and by the incremental adjustments performed @@ -60,8 +60,8 @@ namespace priv /// /// Note: Linux implementation of a monotonic clock that /// takes sleep time into account is represented by -/// CLOCK_BOOTTIME. Android devices can define the macro: -/// SFML_ANDROID_USE_SUSPEND_AWARE_CLOCK to use a separate +/// `CLOCK_BOOTTIME`. Android devices can define the macro: +/// `SFML_ANDROID_USE_SUSPEND_AWARE_CLOCK` to use a separate /// implementation of that clock, instead. /// /// For more information on Linux clocks visit: @@ -95,7 +95,7 @@ public: /// \brief Get the elapsed time /// /// This function returns the time elapsed since the last call - /// to restart() (or the construction of the instance if restart() + /// to `restart()` (or the construction of the instance if `restart()` /// has not been called). /// /// \return Time elapsed @@ -106,7 +106,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Check whether the clock is running /// - /// \return True if the clock is running, false otherwise + /// \return `true` if the clock is running, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isRunning() const; @@ -114,7 +114,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Start the clock /// - /// \see stop + /// \see `stop` /// //////////////////////////////////////////////////////////// void start(); @@ -122,7 +122,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Stop the clock /// - /// \see start + /// \see `start` /// //////////////////////////////////////////////////////////// void stop(); @@ -135,7 +135,7 @@ public: /// /// \return Time elapsed /// - /// \see reset + /// \see `reset` /// //////////////////////////////////////////////////////////// Time restart(); @@ -148,7 +148,7 @@ public: /// /// \return Time elapsed /// - /// \see restart + /// \see `restart` /// //////////////////////////////////////////////////////////// Time reset(); @@ -168,7 +168,7 @@ private: /// \class sf::Clock /// \ingroup system /// -/// sf::Clock is a lightweight class for measuring time. +/// `sf::Clock` is a lightweight class for measuring time. /// /// It provides the most precise time that the underlying /// OS can achieve (generally microseconds or nanoseconds). @@ -187,10 +187,10 @@ private: /// Time time3 = clock.reset(); /// \endcode /// -/// The sf::Time value returned by the clock can then be +/// The `sf::Time` value returned by the clock can then be /// converted to a number of seconds, milliseconds or even /// microseconds. /// -/// \see sf::Time +/// \see `sf::Time` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/Err.hpp b/include/SFML/System/Err.hpp index f3bfcd80d..6baecec3c 100644 --- a/include/SFML/System/Err.hpp +++ b/include/SFML/System/Err.hpp @@ -47,15 +47,15 @@ namespace sf /// \fn sf::err /// \ingroup system /// -/// By default, sf::err() outputs to the same location as `std::cerr`, +/// By default, `sf::err()` outputs to the same location as `std::cerr`, /// (-> the stderr descriptor) which is the console if there's /// one available. /// /// It is a standard `std::ostream` instance, so it supports all the /// insertion operations defined by the STL -/// (operator <<, manipulators, etc.). +/// (`operator<<`, manipulators, etc.). /// -/// sf::err() can be redirected to write to another output, independently +/// `sf::err()` can be redirected to write to another output, independently /// of `std::cerr`, by using the `rdbuf()` function provided by the /// `std::ostream` class. /// diff --git a/include/SFML/System/FileInputStream.hpp b/include/SFML/System/FileInputStream.hpp index 7ce6c5b5c..633a64fe0 100644 --- a/include/SFML/System/FileInputStream.hpp +++ b/include/SFML/System/FileInputStream.hpp @@ -110,7 +110,7 @@ public: /// /// \param filename Name of the file to open /// - /// \return True on success, false on error + /// \return `true` on success, `false` on error /// //////////////////////////////////////////////////////////// [[nodiscard]] bool open(const std::filesystem::path& filename); @@ -182,16 +182,16 @@ private: /// \class sf::FileInputStream /// \ingroup system /// -/// This class is a specialization of InputStream that +/// This class is a specialization of `InputStream` that /// reads from a file on disk. /// -/// It wraps a file in the common InputStream interface +/// It wraps a file in the common `InputStream` interface /// and therefore allows to use generic classes or functions /// that accept such a stream, with a file on disk as the data /// source. /// /// In addition to the virtual functions inherited from -/// InputStream, FileInputStream adds a function to +/// `InputStream`, `FileInputStream` adds a function to /// specify the file to open. /// /// SFML resource classes can usually be loaded directly from @@ -207,6 +207,6 @@ private: /// process(*stream); /// \endcode /// -/// InputStream, MemoryInputStream +/// \see `InputStream`, `MemoryInputStream` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/InputStream.hpp b/include/SFML/System/InputStream.hpp index fa298e177..a9770cb65 100644 --- a/include/SFML/System/InputStream.hpp +++ b/include/SFML/System/InputStream.hpp @@ -102,13 +102,13 @@ public: /// This class allows users to define their own file input sources /// from which SFML can load resources. /// -/// SFML resource classes like sf::Texture and -/// sf::SoundBuffer provide loadFromFile and loadFromMemory functions, +/// SFML resource classes like `sf::Texture` and +/// `sf::SoundBuffer` provide `loadFromFile` and `loadFromMemory` functions, /// which read data from conventional sources. However, if you /// have data coming from a different source (over a network, /// embedded, encrypted, compressed, etc) you can derive your -/// own class from sf::InputStream and load SFML resources with -/// their loadFromStream function. +/// own class from `sf::InputStream` and load SFML resources with +/// their `loadFromStream` function. /// /// Usage example: /// \code @@ -161,4 +161,6 @@ public: /// // etc. /// \endcode /// +/// \see `FileInputStream`, `MemoryInputStream` +/// //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/MemoryInputStream.hpp b/include/SFML/System/MemoryInputStream.hpp index 95a3fa925..cd8ad54c9 100644 --- a/include/SFML/System/MemoryInputStream.hpp +++ b/include/SFML/System/MemoryInputStream.hpp @@ -111,15 +111,15 @@ private: /// \class sf::MemoryInputStream /// \ingroup system /// -/// This class is a specialization of InputStream that +/// This class is a specialization of `InputStream` that /// reads from data in memory. /// -/// It wraps a memory chunk in the common InputStream interface +/// It wraps a memory chunk in the common `InputStream` interface /// and therefore allows to use generic classes or functions /// that accept such a stream, with content already loaded in memory. /// /// In addition to the virtual functions inherited from -/// InputStream, MemoryInputStream adds a function to +/// `InputStream`, `MemoryInputStream` adds a function to /// specify the pointer and size of the data in memory. /// /// SFML resource classes can usually be loaded directly from @@ -134,6 +134,6 @@ private: /// process(stream); /// \endcode /// -/// InputStream, FileInputStream +/// \see `InputStream`, `FileInputStream` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/Sleep.hpp b/include/SFML/System/Sleep.hpp index c9a1ab2be..c5d1962a0 100644 --- a/include/SFML/System/Sleep.hpp +++ b/include/SFML/System/Sleep.hpp @@ -38,13 +38,13 @@ class Time; /// \ingroup system /// \brief Make the current thread sleep for a given duration /// -/// sf::sleep is the best way to block a program or one of its +/// `sf::sleep` is the best way to block a program or one of its /// threads, as it doesn't consume any CPU power. Compared to /// the standard `std::this_thread::sleep_for` function, this /// one provides more accurate sleeping time thanks to some /// platform-specific tweaks. /// -/// sf::sleep only guarantees millisecond precision. Sleeping +/// `sf::sleep` only guarantees millisecond precision. Sleeping /// for a duration less than 1 millisecond is prone to result /// in the actual sleep duration being less than what is /// requested. diff --git a/include/SFML/System/String.hpp b/include/SFML/System/String.hpp index 12f3eae93..9132105d3 100644 --- a/include/SFML/System/String.hpp +++ b/include/SFML/System/String.hpp @@ -111,9 +111,9 @@ public: String() = default; //////////////////////////////////////////////////////////// - /// \brief Deleted nullptr constructor + /// \brief Deleted `std::nullptr_t` constructor /// - /// Disallow construction from nullptr literal + /// Disallow construction from `nullptr` literal /// //////////////////////////////////////////////////////////// String(std::nullptr_t, const std::locale& = {}) = delete; @@ -203,35 +203,35 @@ public: String(std::u32string utf32String); //////////////////////////////////////////////////////////// - /// \brief Create a new sf::String from a UTF-8 encoded string + /// \brief Create a new `sf::String` from a UTF-8 encoded string /// /// \param begin Forward iterator to the beginning of the UTF-8 sequence /// \param end Forward iterator to the end of the UTF-8 sequence /// - /// \return A sf::String containing the source string + /// \return A `sf::String` containing the source string /// - /// \see fromUtf16, fromUtf32 + /// \see `fromUtf16`, `fromUtf32` /// //////////////////////////////////////////////////////////// template [[nodiscard]] static String fromUtf8(T begin, T end); //////////////////////////////////////////////////////////// - /// \brief Create a new sf::String from a UTF-16 encoded string + /// \brief Create a new `sf::String` from a UTF-16 encoded string /// /// \param begin Forward iterator to the beginning of the UTF-16 sequence /// \param end Forward iterator to the end of the UTF-16 sequence /// - /// \return A sf::String containing the source string + /// \return A `sf::String` containing the source string /// - /// \see fromUtf8, fromUtf32 + /// \see `fromUtf8`, `fromUtf32` /// //////////////////////////////////////////////////////////// template [[nodiscard]] static String fromUtf16(T begin, T end); //////////////////////////////////////////////////////////// - /// \brief Create a new sf::String from a UTF-32 encoded string + /// \brief Create a new `sf::String` from a UTF-32 encoded string /// /// This function is provided for consistency, it is equivalent to /// using the constructors that takes a `const char32_t*` or @@ -240,9 +240,9 @@ public: /// \param begin Forward iterator to the beginning of the UTF-32 sequence /// \param end Forward iterator to the end of the UTF-32 sequence /// - /// \return A sf::String containing the source string + /// \return A `sf::String` containing the source string /// - /// \see fromUtf8, fromUtf16 + /// \see `fromUtf8`, `fromUtf16` /// //////////////////////////////////////////////////////////// template @@ -256,11 +256,11 @@ public: /// Characters that do not fit in the target encoding are /// discarded from the returned string. /// This operator is defined for convenience, and is equivalent - /// to calling toAnsiString(). + /// to calling `toAnsiString()`. /// /// \return Converted ANSI string /// - /// \see toAnsiString, operator std::wstring + /// \see `toAnsiString`, `operator std::wstring` /// //////////////////////////////////////////////////////////// operator std::string() const; @@ -271,11 +271,11 @@ public: /// Characters that do not fit in the target encoding are /// discarded from the returned string. /// This operator is defined for convenience, and is equivalent - /// to calling toWideString(). + /// to calling `toWideString()`. /// /// \return Converted wide string /// - /// \see toWideString, operator std::string + /// \see `toWideString`, `operator std::string` /// //////////////////////////////////////////////////////////// operator std::wstring() const; @@ -284,7 +284,7 @@ public: /// \brief Convert the Unicode string to an ANSI string /// /// The UTF-32 string is converted to an ANSI string in - /// the encoding defined by \a locale. + /// the encoding defined by \a `locale`. /// Characters that do not fit in the target encoding are /// discarded from the returned string. /// @@ -292,7 +292,7 @@ public: /// /// \return Converted ANSI string /// - /// \see toWideString, operator std::string + /// \see `toWideString`, `operator std::string` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::string toAnsiString(const std::locale& locale = {}) const; @@ -305,7 +305,7 @@ public: /// /// \return Converted wide string /// - /// \see toAnsiString, operator std::wstring + /// \see `toAnsiString`, `operator std::wstring` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::wstring toWideString() const; @@ -315,7 +315,7 @@ public: /// /// \return Converted UTF-8 string /// - /// \see toUtf16, toUtf32 + /// \see `toUtf16`, `toUtf32` /// //////////////////////////////////////////////////////////// [[nodiscard]] sf::U8String toUtf8() const; @@ -325,7 +325,7 @@ public: /// /// \return Converted UTF-16 string /// - /// \see toUtf8, toUtf32 + /// \see `toUtf8`, `toUtf32` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::u16string toUtf16() const; @@ -338,13 +338,13 @@ public: /// /// \return Converted UTF-32 string /// - /// \see toUtf8, toUtf16 + /// \see `toUtf8`, `toUtf16` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::u32string toUtf32() const; //////////////////////////////////////////////////////////// - /// \brief Overload of += operator to append an UTF-32 string + /// \brief Overload of `operator+=` to append an UTF-32 string /// /// \param right String to append /// @@ -354,27 +354,27 @@ public: String& operator+=(const String& right); //////////////////////////////////////////////////////////// - /// \brief Overload of [] operator to access a character by its position + /// \brief Overload of `operator[]` to access a character by its position /// /// This function provides read-only access to characters. - /// Note: the behavior is undefined if \a index is out of range. + /// Note: the behavior is undefined if \a `index` is out of range. /// /// \param index Index of the character to get /// - /// \return Character at position \a index + /// \return Character at position \a `index` /// //////////////////////////////////////////////////////////// [[nodiscard]] char32_t operator[](std::size_t index) const; //////////////////////////////////////////////////////////// - /// \brief Overload of [] operator to access a character by its position + /// \brief Overload of `operator[]` to access a character by its position /// /// This function provides read and write access to characters. - /// Note: the behavior is undefined if \a index is out of range. + /// Note: the behavior is undefined if \a `index` is out of range. /// /// \param index Index of the character to get /// - /// \return Reference to the character at position \a index + /// \return Reference to the character at position \a `index` /// //////////////////////////////////////////////////////////// [[nodiscard]] char32_t& operator[](std::size_t index); @@ -384,7 +384,7 @@ public: /// /// This function removes all the characters from the string. /// - /// \see isEmpty, erase + /// \see `isEmpty`, `erase` /// //////////////////////////////////////////////////////////// void clear(); @@ -394,7 +394,7 @@ public: /// /// \return Number of characters in the string /// - /// \see isEmpty + /// \see `isEmpty` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::size_t getSize() const; @@ -402,9 +402,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Check whether the string is empty or not /// - /// \return True if the string is empty (i.e. contains no character) + /// \return `true` if the string is empty (i.e. contains no character) /// - /// \see clear, getSize + /// \see `clear`, `getSize` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isEmpty() const; @@ -412,8 +412,8 @@ public: //////////////////////////////////////////////////////////// /// \brief Erase one or more characters from the string /// - /// This function removes a sequence of \a count characters - /// starting from \a position. + /// This function removes a sequence of \a `count` characters + /// starting from \a `position`. /// /// \param position Position of the first character to erase /// \param count Number of characters to erase @@ -424,8 +424,8 @@ public: //////////////////////////////////////////////////////////// /// \brief Insert one or more characters into the string /// - /// This function inserts the characters of \a str - /// into the string, starting from \a position. + /// This function inserts the characters of \a `str` + /// into the string, starting from \a `position`. /// /// \param position Position of insertion /// \param str Characters to insert @@ -436,13 +436,13 @@ public: //////////////////////////////////////////////////////////// /// \brief Find a sequence of one or more characters in the string /// - /// This function searches for the characters of \a str - /// in the string, starting from \a start. + /// This function searches for the characters of \a `str` + /// in the string, starting from \a `start`. /// /// \param str Characters to find /// \param start Where to begin searching /// - /// \return Position of \a str in the string, or String::InvalidPos if not found + /// \return Position of \a `str` in the string, or `String::InvalidPos` if not found /// //////////////////////////////////////////////////////////// [[nodiscard]] std::size_t find(const String& str, std::size_t start = 0) const; @@ -450,8 +450,8 @@ public: //////////////////////////////////////////////////////////// /// \brief Replace a substring with another string /// - /// This function replaces the substring that starts at index \a position - /// and spans \a length characters with the string \a replaceWith. + /// This function replaces the substring that starts at index \a `position` + /// and spans \a `length` characters with the string \a `replaceWith`. /// /// \param position Index of the first character to be replaced /// \param length Number of characters to replace. You can pass InvalidPos to @@ -464,11 +464,11 @@ public: //////////////////////////////////////////////////////////// /// \brief Replace all occurrences of a substring with a replacement string /// - /// This function replaces all occurrences of \a searchFor in this string - /// with the string \a replaceWith. + /// This function replaces all occurrences of \a `searchFor` in this string + /// with the string \a `replaceWith`. /// /// \param searchFor The value being searched for - /// \param replaceWith The value that replaces found \a searchFor values + /// \param replaceWith The value that replaces found \a `searchFor` values /// //////////////////////////////////////////////////////////// void replace(const String& searchFor, const String& replaceWith); @@ -476,13 +476,13 @@ public: //////////////////////////////////////////////////////////// /// \brief Return a part of the string /// - /// This function returns the substring that starts at index \a position - /// and spans \a length characters. + /// This function returns the substring that starts at index \a `position` + /// and spans \a `length` characters. /// /// \param position Index of the first character /// \param length Number of characters to include in the substring (if /// the string is shorter, as many characters as possible - /// are included). \ref InvalidPos can be used to include all + /// are included). `InvalidPos` can be used to include all /// characters until the end of the string. /// /// \return String object containing a substring of this object @@ -508,7 +508,7 @@ public: /// /// \return Read-write iterator to the beginning of the string characters /// - /// \see end + /// \see `end` /// //////////////////////////////////////////////////////////// [[nodiscard]] Iterator begin(); @@ -518,7 +518,7 @@ public: /// /// \return Read-only iterator to the beginning of the string characters /// - /// \see end + /// \see `end` /// //////////////////////////////////////////////////////////// [[nodiscard]] ConstIterator begin() const; @@ -532,7 +532,7 @@ public: /// /// \return Read-write iterator to the end of the string characters /// - /// \see begin + /// \see `begin` /// //////////////////////////////////////////////////////////// [[nodiscard]] Iterator end(); @@ -546,7 +546,7 @@ public: /// /// \return Read-only iterator to the end of the string characters /// - /// \see begin + /// \see `begin` /// //////////////////////////////////////////////////////////// [[nodiscard]] ConstIterator end() const; @@ -563,79 +563,79 @@ private: //////////////////////////////////////////////////////////// /// \relates String -/// \brief Overload of == operator to compare two UTF-32 strings +/// \brief Overload of `operator==` to compare two UTF-32 strings /// /// \param left Left operand (a string) /// \param right Right operand (a string) /// -/// \return True if both strings are equal +/// \return `true` if both strings are equal /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API bool operator==(const String& left, const String& right); //////////////////////////////////////////////////////////// /// \relates String -/// \brief Overload of != operator to compare two UTF-32 strings +/// \brief Overload of `operator!=` to compare two UTF-32 strings /// /// \param left Left operand (a string) /// \param right Right operand (a string) /// -/// \return True if both strings are different +/// \return `true` if both strings are different /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API bool operator!=(const String& left, const String& right); //////////////////////////////////////////////////////////// /// \relates String -/// \brief Overload of < operator to compare two UTF-32 strings +/// \brief Overload of `operator<` to compare two UTF-32 strings /// /// \param left Left operand (a string) /// \param right Right operand (a string) /// -/// \return True if \a left is lexicographically before \a right +/// \return `true` if \a `left` is lexicographically before \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API bool operator<(const String& left, const String& right); //////////////////////////////////////////////////////////// /// \relates String -/// \brief Overload of > operator to compare two UTF-32 strings +/// \brief Overload of `operator>` to compare two UTF-32 strings /// /// \param left Left operand (a string) /// \param right Right operand (a string) /// -/// \return True if \a left is lexicographically after \a right +/// \return `true` if \a `left` is lexicographically after \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API bool operator>(const String& left, const String& right); //////////////////////////////////////////////////////////// /// \relates String -/// \brief Overload of <= operator to compare two UTF-32 strings +/// \brief Overload of `operator<=` to compare two UTF-32 strings /// /// \param left Left operand (a string) /// \param right Right operand (a string) /// -/// \return True if \a left is lexicographically before or equivalent to \a right +/// \return `true` if \a `left` is lexicographically before or equivalent to \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API bool operator<=(const String& left, const String& right); //////////////////////////////////////////////////////////// /// \relates String -/// \brief Overload of >= operator to compare two UTF-32 strings +/// \brief Overload of `operator>=` to compare two UTF-32 strings /// /// \param left Left operand (a string) /// \param right Right operand (a string) /// -/// \return True if \a left is lexicographically after or equivalent to \a right +/// \return `true` if \a `left` is lexicographically after or equivalent to \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API bool operator>=(const String& left, const String& right); //////////////////////////////////////////////////////////// /// \relates String -/// \brief Overload of binary + operator to concatenate two strings +/// \brief Overload of binary `operator+` to concatenate two strings /// /// \param left Left operand (a string) /// \param right Right operand (a string) @@ -654,7 +654,7 @@ private: /// \class sf::String /// \ingroup system /// -/// sf::String is a utility string class defined mainly for +/// `sf::String` is a utility string class defined mainly for /// convenience. It is a Unicode string (implemented using /// UTF-32), thus it can store any character in the world /// (European, Chinese, Arabic, Hebrew, etc.). @@ -662,7 +662,7 @@ private: /// It automatically handles conversions from/to ANSI and /// wide strings, so that you can work with standard string /// classes and still be compatible with functions taking a -/// sf::String. +/// `sf::String`. /// /// \code /// sf::String s; @@ -685,16 +685,16 @@ private: /// s = sf::String("hello", locale); /// \endcode /// -/// sf::String defines the most important functions of the +/// `sf::String` defines the most important functions of the /// standard `std::string` class: removing, random access, iterating, /// appending, comparing, etc. However it is a simple class /// provided for convenience, and you may have to consider using /// a more optimized class if your program requires complex string /// handling. The automatic conversion functions will then take -/// care of converting your string to sf::String whenever SFML +/// care of converting your string to `sf::String` whenever SFML /// requires it. /// /// Please note that SFML also defines a low-level, generic -/// interface for Unicode handling, see the sf::Utf classes. +/// interface for Unicode handling, see the `sf::Utf` classes. /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/SuspendAwareClock.hpp b/include/SFML/System/SuspendAwareClock.hpp index f11429cc7..dd5a01934 100644 --- a/include/SFML/System/SuspendAwareClock.hpp +++ b/include/SFML/System/SuspendAwareClock.hpp @@ -38,16 +38,16 @@ namespace sf //////////////////////////////////////////////////////////// /// \brief Android, chrono-compatible, suspend-aware clock /// -/// Linux steady clock is represented by CLOCK_MONOTONIC. +/// Linux steady clock is represented by `CLOCK_MONOTONIC`. /// However, this implementation does not work properly for /// long-running clocks that work in the background when the /// system is suspended. /// -/// SuspendAwareClock uses CLOCK_BOOTTIME which is identical -/// to CLOCK_MONOTONIC, except that it also includes any time +/// `SuspendAwareClock` uses `CLOCK_BOOTTIME` which is identical +/// to `CLOCK_MONOTONIC`, except that it also includes any time /// that the system is suspended. /// -/// Note: In most cases, CLOCK_MONOTONIC is a better choice. +/// Note: In most cases, `CLOCK_MONOTONIC` is a better choice. /// Make sure this implementation is required for your use case. /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/Time.hpp b/include/SFML/System/Time.hpp index 12da43ba5..93c2e233b 100644 --- a/include/SFML/System/Time.hpp +++ b/include/SFML/System/Time.hpp @@ -61,7 +61,7 @@ public: /// /// \return Time in seconds /// - /// \see asMilliseconds, asMicroseconds + /// \see `asMilliseconds`, `asMicroseconds` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr float asSeconds() const; @@ -71,7 +71,7 @@ public: /// /// \return Time in milliseconds /// - /// \see asSeconds, asMicroseconds + /// \see `asSeconds`, `asMicroseconds` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr std::int32_t asMilliseconds() const; @@ -81,13 +81,13 @@ public: /// /// \return Time in microseconds /// - /// \see asSeconds, asMilliseconds + /// \see `asSeconds`, `asMilliseconds` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr std::int64_t asMicroseconds() const; //////////////////////////////////////////////////////////// - /// \brief Return the time value as a `std::chorono::duration` + /// \brief Return the time value as a `std::chrono::duration` /// /// \return Time in microseconds /// @@ -128,7 +128,7 @@ private: /// /// \return Time value constructed from the amount of seconds /// -/// \see milliseconds, microseconds +/// \see `milliseconds`, `microseconds` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Time seconds(float amount); @@ -141,7 +141,7 @@ private: /// /// \return Time value constructed from the amount of milliseconds /// -/// \see seconds, microseconds +/// \see `seconds`, `microseconds` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Time milliseconds(std::int32_t amount); @@ -154,86 +154,86 @@ private: /// /// \return Time value constructed from the amount of microseconds /// -/// \see seconds, milliseconds +/// \see `seconds`, `milliseconds` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Time microseconds(std::int64_t amount); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of == operator to compare two time values +/// \brief Overload of `operator==` to compare two time values /// /// \param left Left operand (a time) /// \param right Right operand (a time) /// -/// \return True if both time values are equal +/// \return `true` if both time values are equal /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator==(Time left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of != operator to compare two time values +/// \brief Overload of `operator!=` to compare two time values /// /// \param left Left operand (a time) /// \param right Right operand (a time) /// -/// \return True if both time values are different +/// \return `true` if both time values are different /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator!=(Time left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of < operator to compare two time values +/// \brief Overload of `operator<` to compare two time values /// /// \param left Left operand (a time) /// \param right Right operand (a time) /// -/// \return True if \a left is lesser than \a right +/// \return `true` if \a `left` is lesser than \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator<(Time left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of > operator to compare two time values +/// \brief Overload of `operator>` to compare two time values /// /// \param left Left operand (a time) /// \param right Right operand (a time) /// -/// \return True if \a left is greater than \a right +/// \return `true` if \a `left` is greater than \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator>(Time left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of <= operator to compare two time values +/// \brief Overload of `operator<=` to compare two time values /// /// \param left Left operand (a time) /// \param right Right operand (a time) /// -/// \return True if \a left is lesser or equal than \a right +/// \return `true` if \a `left` is lesser or equal than \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator<=(Time left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of >= operator to compare two time values +/// \brief Overload of `operator>=` to compare two time values /// /// \param left Left operand (a time) /// \param right Right operand (a time) /// -/// \return True if \a left is greater or equal than \a right +/// \return `true` if \a `left` is greater or equal than \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr bool operator>=(Time left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of unary - operator to negate a time value +/// \brief Overload of unary `operator-` to negate a time value /// /// \param right Right operand (a time) /// @@ -244,7 +244,7 @@ private: //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary + operator to add two time values +/// \brief Overload of binary `operator+` to add two time values /// /// \param left Left operand (a time) /// \param right Right operand (a time) @@ -256,7 +256,7 @@ private: //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary += operator to add/assign two time values +/// \brief Overload of binary `operator+=` to add/assign two time values /// /// \param left Left operand (a time) /// \param right Right operand (a time) @@ -268,7 +268,7 @@ constexpr Time& operator+=(Time& left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary - operator to subtract two time values +/// \brief Overload of binary `operator-` to subtract two time values /// /// \param left Left operand (a time) /// \param right Right operand (a time) @@ -280,7 +280,7 @@ constexpr Time& operator+=(Time& left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary -= operator to subtract/assign two time values +/// \brief Overload of binary `operator-=` to subtract/assign two time values /// /// \param left Left operand (a time) /// \param right Right operand (a time) @@ -292,156 +292,156 @@ constexpr Time& operator-=(Time& left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary * operator to scale a time value +/// \brief Overload of binary `operator*` to scale a time value /// /// \param left Left operand (a time) /// \param right Right operand (a number) /// -/// \return \a left multiplied by \a right +/// \return \a `left` multiplied by \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Time operator*(Time left, float right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary * operator to scale a time value +/// \brief Overload of binary `operator*` to scale a time value /// /// \param left Left operand (a time) /// \param right Right operand (a number) /// -/// \return \a left multiplied by \a right +/// \return \a `left` multiplied by \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Time operator*(Time left, std::int64_t right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary * operator to scale a time value +/// \brief Overload of binary `operator*` to scale a time value /// /// \param left Left operand (a number) /// \param right Right operand (a time) /// -/// \return \a left multiplied by \a right +/// \return \a `left` multiplied by \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Time operator*(float left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary * operator to scale a time value +/// \brief Overload of binary `operator*` to scale a time value /// /// \param left Left operand (a number) /// \param right Right operand (a time) /// -/// \return \a left multiplied by \a right +/// \return \a `left` multiplied by \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Time operator*(std::int64_t left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary *= operator to scale/assign a time value +/// \brief Overload of binary `operator*=` to scale/assign a time value /// /// \param left Left operand (a time) /// \param right Right operand (a number) /// -/// \return \a left multiplied by \a right +/// \return \a `left` multiplied by \a `right` /// //////////////////////////////////////////////////////////// constexpr Time& operator*=(Time& left, float right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary *= operator to scale/assign a time value +/// \brief Overload of binary `operator*=` to scale/assign a time value /// /// \param left Left operand (a time) /// \param right Right operand (a number) /// -/// \return \a left multiplied by \a right +/// \return \a `left` multiplied by \a `right` /// //////////////////////////////////////////////////////////// constexpr Time& operator*=(Time& left, std::int64_t right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary / operator to scale a time value +/// \brief Overload of binary `operator/` to scale a time value /// /// \param left Left operand (a time) /// \param right Right operand (a number) /// -/// \return \a left divided by \a right +/// \return \a `left` divided by \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Time operator/(Time left, float right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary / operator to scale a time value +/// \brief Overload of binary `operator/` to scale a time value /// /// \param left Left operand (a time) /// \param right Right operand (a number) /// -/// \return \a left divided by \a right +/// \return \a `left` divided by \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Time operator/(Time left, std::int64_t right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary /= operator to scale/assign a time value +/// \brief Overload of binary `operator/=` to scale/assign a time value /// /// \param left Left operand (a time) /// \param right Right operand (a number) /// -/// \return \a left divided by \a right +/// \return \a `left` divided by \a `right` /// //////////////////////////////////////////////////////////// constexpr Time& operator/=(Time& left, float right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary /= operator to scale/assign a time value +/// \brief Overload of binary `operator/=` to scale/assign a time value /// /// \param left Left operand (a time) /// \param right Right operand (a number) /// -/// \return \a left divided by \a right +/// \return \a `left` divided by \a `right` /// //////////////////////////////////////////////////////////// constexpr Time& operator/=(Time& left, std::int64_t right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary / operator to compute the ratio of two time values +/// \brief Overload of binary `operator/` to compute the ratio of two time values /// /// \param left Left operand (a time) /// \param right Right operand (a time) /// -/// \return \a left divided by \a right +/// \return \a `left` divided by \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr float operator/(Time left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary % operator to compute remainder of a time value +/// \brief Overload of binary `operator%` to compute remainder of a time value /// /// \param left Left operand (a time) /// \param right Right operand (a time) /// -/// \return \a left modulo \a right +/// \return \a `left` modulo \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Time operator%(Time left, Time right); //////////////////////////////////////////////////////////// /// \relates Time -/// \brief Overload of binary %= operator to compute/assign remainder of a time value +/// \brief Overload of binary `operator%=` to compute/assign remainder of a time value /// /// \param left Left operand (a time) /// \param right Right operand (a time) /// -/// \return \a left modulo \a right +/// \return \a `left` modulo \a `right` /// //////////////////////////////////////////////////////////// constexpr Time& operator%=(Time& left, Time right); @@ -455,14 +455,14 @@ constexpr Time& operator%=(Time& left, Time right); /// \class sf::Time /// \ingroup system /// -/// sf::Time encapsulates a time value in a flexible way. +/// `sf::Time` encapsulates a time value in a flexible way. /// It allows to define a time value either as a number of /// seconds, milliseconds or microseconds. It also works the /// other way round: you can read a time value as either /// a number of seconds, milliseconds or microseconds. It /// even interoperates with the `` header. You can -/// construct an sf::Time from a chrono::duration and read -/// any sf::Time as a chrono::duration. +/// construct an `sf::Time` from a `chrono::duration` and read +/// any `sf::Time` as a chrono::duration. /// /// By using such a flexible interface, the API doesn't /// impose any fixed type or resolution for time values, @@ -499,6 +499,6 @@ constexpr Time& operator%=(Time& left, Time right); /// update(sf::milliseconds(100)); /// \endcode /// -/// \see sf::Clock +/// \see `sf::Clock` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/Utf.hpp b/include/SFML/System/Utf.hpp index f4a9931ae..000d314b6 100644 --- a/include/SFML/System/Utf.hpp +++ b/include/SFML/System/Utf.hpp @@ -123,7 +123,7 @@ public: /// \brief Convert an ANSI characters range to UTF-8 /// /// The current global locale will be used by default, unless you - /// pass a custom one in the \a locale parameter. + /// pass a custom one in the \a `locale` parameter. /// /// \param begin Iterator pointing to the beginning of the input sequence /// \param end Iterator pointing to the end of the input sequence @@ -166,7 +166,7 @@ public: /// \brief Convert an UTF-8 characters range to ANSI characters /// /// The current global locale will be used by default, unless you - /// pass a custom one in the \a locale parameter. + /// pass a custom one in the \a `locale` parameter. /// /// \param begin Iterator pointing to the beginning of the input sequence /// \param end Iterator pointing to the end of the input sequence @@ -213,7 +213,7 @@ public: /// /// This functions does nothing more than a direct copy; /// it is defined only to provide the same interface as other - /// specializations of the sf::Utf<> template, and allow + /// specializations of the `sf::Utf<>` template, and allow /// generic code to be written on top of it. /// /// \param begin Iterator pointing to the beginning of the input sequence @@ -329,7 +329,7 @@ public: /// \brief Convert an ANSI characters range to UTF-16 /// /// The current global locale will be used by default, unless you - /// pass a custom one in the \a locale parameter. + /// pass a custom one in the \a `locale` parameter. /// /// \param begin Iterator pointing to the beginning of the input sequence /// \param end Iterator pointing to the end of the input sequence @@ -372,7 +372,7 @@ public: /// \brief Convert an UTF-16 characters range to ANSI characters /// /// The current global locale will be used by default, unless you - /// pass a custom one in the \a locale parameter. + /// pass a custom one in the \a `locale` parameter. /// /// \param begin Iterator pointing to the beginning of the input sequence /// \param end Iterator pointing to the end of the input sequence @@ -432,7 +432,7 @@ public: /// /// This functions does nothing more than a direct copy; /// it is defined only to provide the same interface as other - /// specializations of the sf::Utf<> template, and allow + /// specializations of the `sf::Utf<>` template, and allow /// generic code to be written on top of it. /// /// \param begin Iterator pointing to the beginning of the input sequence @@ -536,7 +536,7 @@ public: /// \brief Convert an ANSI characters range to UTF-32 /// /// The current global locale will be used by default, unless you - /// pass a custom one in the \a locale parameter. + /// pass a custom one in the \a `locale` parameter. /// /// \param begin Iterator pointing to the beginning of the input sequence /// \param end Iterator pointing to the end of the input sequence @@ -579,7 +579,7 @@ public: /// \brief Convert an UTF-32 characters range to ANSI characters /// /// The current global locale will be used by default, unless you - /// pass a custom one in the \a locale parameter. + /// pass a custom one in the \a `locale` parameter. /// /// \param begin Iterator pointing to the beginning of the input sequence /// \param end Iterator pointing to the end of the input sequence @@ -652,7 +652,7 @@ public: /// /// This functions does nothing more than a direct copy; /// it is defined only to provide the same interface as other - /// specializations of the sf::Utf<> template, and allow + /// specializations of the `sf::Utf<>` template, and allow /// generic code to be written on top of it. /// /// \param begin Iterator pointing to the beginning of the input sequence @@ -669,7 +669,7 @@ public: /// \brief Decode a single ANSI character to UTF-32 /// /// This function does not exist in other specializations - /// of sf::Utf<>, it is defined for convenience (it is used by + /// of `sf::Utf<>`, it is defined for convenience (it is used by /// several other conversion functions). /// /// \param input Input ANSI character @@ -685,7 +685,7 @@ public: /// \brief Decode a single wide character to UTF-32 /// /// This function does not exist in other specializations - /// of sf::Utf<>, it is defined for convenience (it is used by + /// of `sf::Utf<>`, it is defined for convenience (it is used by /// several other conversion functions). /// /// \param input Input wide character @@ -700,7 +700,7 @@ public: /// \brief Encode a single UTF-32 character to ANSI /// /// This function does not exist in other specializations - /// of sf::Utf<>, it is defined for convenience (it is used by + /// of `sf::Utf<>`, it is defined for convenience (it is used by /// several other conversion functions). /// /// \param codepoint Iterator pointing to the beginning of the input sequence @@ -718,7 +718,7 @@ public: /// \brief Encode a single UTF-32 character to wide /// /// This function does not exist in other specializations - /// of sf::Utf<>, it is defined for convenience (it is used by + /// of `sf::Utf<>`, it is defined for convenience (it is used by /// several other conversion functions). /// /// \param codepoint Iterator pointing to the beginning of the input sequence @@ -748,17 +748,17 @@ using Utf32 = Utf<32>; /// /// Utility class providing generic functions for UTF conversions. /// -/// sf::Utf is a low-level, generic interface for counting, iterating, +/// `sf::Utf` is a low-level, generic interface for counting, iterating, /// encoding and decoding Unicode characters and strings. It is able /// to handle ANSI, wide, latin-1, UTF-8, UTF-16 and UTF-32 encodings. /// -/// sf::Utf functions are all static, these classes are not meant to +/// `sf::Utf` functions are all static, these classes are not meant to /// be instantiated. All the functions are template, so that you /// can use any character / string type for a given encoding. /// /// It has 3 specializations: -/// \li sf::Utf<8> (with sf::Utf8 type alias) -/// \li sf::Utf<16> (with sf::Utf16 type alias) -/// \li sf::Utf<32> (with sf::Utf32 type alias) +/// \li `sf::Utf<8>` (with `sf::Utf8` type alias) +/// \li `sf::Utf<16>` (with `sf::Utf16` type alias) +/// \li `sf::Utf<32>` (with `sf::Utf32` type alias) /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/Vector2.hpp b/include/SFML/System/Vector2.hpp index 66fbe6abd..93a5ec7d4 100644 --- a/include/SFML/System/Vector2.hpp +++ b/include/SFML/System/Vector2.hpp @@ -43,7 +43,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Default constructor /// - /// Creates a Vector2(0, 0). + /// Creates a `Vector2(0, 0)`. /// //////////////////////////////////////////////////////////// constexpr Vector2() = default; @@ -77,12 +77,12 @@ public: /// \param r Length of vector (can be negative) /// \param phi Angle from X axis /// - /// Note that this constructor is lossy: calling length() and angle() + /// Note that this constructor is lossy: calling `length()` and `angle()` /// may return values different to those provided in this constructor. /// /// In particular, these transforms can be applied: - /// * Vector2(r, phi) == Vector2(-r, phi + 180_deg) - /// * Vector2(r, phi) == Vector2(r, phi + n * 360_deg) + /// * `Vector2(r, phi) == Vector2(-r, phi + 180_deg)` + /// * `Vector2(r, phi) == Vector2(r, phi + n * 360_deg)` /// //////////////////////////////////////////////////////////// SFML_SYSTEM_API Vector2(T r, Angle phi); @@ -90,7 +90,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Length of the vector (floating-point). /// - /// If you are not interested in the actual length, but only in comparisons, consider using lengthSquared(). + /// If you are not interested in the actual length, but only in comparisons, consider using `lengthSquared()`. /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API T length() const; @@ -98,7 +98,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Square of vector's length. /// - /// Suitable for comparisons, more efficient than length(). + /// Suitable for comparisons, more efficient than `length()`. /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr T lengthSquared() const; @@ -106,18 +106,18 @@ public: //////////////////////////////////////////////////////////// /// \brief Vector with same direction but length 1 (floating-point). /// - /// \pre \c *this is no zero vector. + /// \pre `*this` is no zero vector. /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API Vector2 normalized() const; //////////////////////////////////////////////////////////// - /// \brief Signed angle from \c *this to \c rhs (floating-point). + /// \brief Signed angle from `*this` to \a `rhs` (floating-point). /// - /// \return The smallest angle which rotates \c *this in positive - /// or negative direction, until it has the same direction as \c rhs. + /// \return The smallest angle which rotates `*this` in positive + /// or negative direction, until it has the same direction as \a `rhs`. /// The result has a sign and lies in the range [-180, 180) degrees. - /// \pre Neither \c *this nor \c rhs is a zero vector. + /// \pre Neither `*this` nor \a `rhs` is a zero vector. /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API Angle angleTo(Vector2 rhs) const; @@ -139,16 +139,16 @@ public: /// Returns a vector with same length but different direction. /// /// In SFML's default coordinate system with +X right and +Y down, - /// this amounts to a clockwise rotation by \c phi. + /// this amounts to a clockwise rotation by \a `phi`. /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API Vector2 rotatedBy(Angle phi) const; //////////////////////////////////////////////////////////// - /// \brief Projection of this vector onto \c axis (floating-point). + /// \brief Projection of this vector onto \a `axis` (floating-point). /// /// \param axis Vector being projected onto. Need not be normalized. - /// \pre \c axis must not have length zero. + /// \pre \a `axis` must not have length zero. /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API Vector2 projectedOnto(Vector2 axis) const; @@ -156,7 +156,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Returns a perpendicular vector. /// - /// Returns \c *this rotated by +90 degrees; (x,y) becomes (-y,x). + /// Returns `*this` rotated by +90 degrees; (x,y) becomes (-y,x). /// For example, the vector (1,0) is transformed to (0,1). /// /// In SFML's default coordinate system with +X right and +Y down, @@ -181,9 +181,9 @@ public: [[nodiscard]] constexpr T cross(Vector2 rhs) const; //////////////////////////////////////////////////////////// - /// \brief Component-wise multiplication of \c *this and \c rhs. + /// \brief Component-wise multiplication of `*this` and \a `rhs`. /// - /// Computes (lhs.x*rhs.x, lhs.y*rhs.y). + /// Computes `(lhs.x*rhs.x, lhs.y*rhs.y)`. /// /// Scaling is the most common use case for component-wise multiplication/division. /// This operation is also known as the Hadamard or Schur product. @@ -192,13 +192,13 @@ public: [[nodiscard]] constexpr Vector2 componentWiseMul(Vector2 rhs) const; //////////////////////////////////////////////////////////// - /// \brief Component-wise division of \c *this and \c rhs. + /// \brief Component-wise division of `*this` and \a `rhs`. /// - /// Computes (lhs.x/rhs.x, lhs.y/rhs.y). + /// Computes `(lhs.x/rhs.x, lhs.y/rhs.y)`. /// /// Scaling is the most common use case for component-wise multiplication/division. /// - /// \pre Neither component of \c rhs is zero. + /// \pre Neither component of \a `rhs` is zero. /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Vector2 componentWiseDiv(Vector2 rhs) const; @@ -227,11 +227,11 @@ using Vector2f = Vector2; //////////////////////////////////////////////////////////// /// \relates Vector2 -/// \brief Overload of unary operator - +/// \brief Overload of unary `operator-` /// /// \param right Vector to negate /// -/// \return Memberwise opposite of the vector +/// \return Member-wise opposite of the vector /// //////////////////////////////////////////////////////////// template @@ -239,15 +239,15 @@ template //////////////////////////////////////////////////////////// /// \relates Vector2 -/// \brief Overload of binary operator += +/// \brief Overload of binary `operator+=` /// -/// This operator performs a memberwise addition of both vectors, -/// and assigns the result to \c left. +/// This operator performs a member-wise addition of both vectors, +/// and assigns the result to \a `left`. /// /// \param left Left operand (a vector) /// \param right Right operand (a vector) /// -/// \return Reference to \c left +/// \return Reference to \a `left` /// //////////////////////////////////////////////////////////// template @@ -255,10 +255,10 @@ constexpr Vector2& operator+=(Vector2& left, Vector2 right); //////////////////////////////////////////////////////////// /// \relates Vector2 -/// \brief Overload of binary operator -= +/// \brief Overload of binary `operator-=` /// -/// This operator performs a memberwise subtraction of both vectors, -/// and assigns the result to \c left. +/// This operator performs a member-wise subtraction of both vectors, +/// and assigns the result to \a `left. /// /// \param left Left operand (a vector) /// \param right Right operand (a vector) @@ -271,12 +271,12 @@ constexpr Vector2& operator-=(Vector2& left, Vector2 right); //////////////////////////////////////////////////////////// /// \relates Vector2 -/// \brief Overload of binary operator + +/// \brief Overload of binary `operator+` /// /// \param left Left operand (a vector) /// \param right Right operand (a vector) /// -/// \return Memberwise addition of both vectors +/// \return Member-wise addition of both vectors /// //////////////////////////////////////////////////////////// template @@ -284,12 +284,12 @@ template //////////////////////////////////////////////////////////// /// \relates Vector2 -/// \brief Overload of binary operator - +/// \brief Overload of binary `operator-` /// /// \param left Left operand (a vector) /// \param right Right operand (a vector) /// -/// \return Memberwise subtraction of both vectors +/// \return Member-wise subtraction of both vectors /// //////////////////////////////////////////////////////////// template @@ -297,12 +297,12 @@ template //////////////////////////////////////////////////////////// /// \relates Vector2 -/// \brief Overload of binary operator * +/// \brief Overload of binary `operator*` /// /// \param left Left operand (a vector) /// \param right Right operand (a scalar value) /// -/// \return Memberwise multiplication by \c right +/// \return Member-wise multiplication by \a `right` /// //////////////////////////////////////////////////////////// template @@ -310,12 +310,12 @@ template //////////////////////////////////////////////////////////// /// \relates Vector2 -/// \brief Overload of binary operator * +/// \brief Overload of binary `operator*` /// /// \param left Left operand (a scalar value) /// \param right Right operand (a vector) /// -/// \return Memberwise multiplication by \c left +/// \return Member-wise multiplication by \a `left` /// //////////////////////////////////////////////////////////// template @@ -323,15 +323,15 @@ template //////////////////////////////////////////////////////////// /// \relates Vector2 -/// \brief Overload of binary operator *= +/// \brief Overload of binary `operator*=` /// -/// This operator performs a memberwise multiplication by \c right, -/// and assigns the result to \c left. +/// This operator performs a member-wise multiplication by \a `right`, +/// and assigns the result to \a `left`. /// /// \param left Left operand (a vector) /// \param right Right operand (a scalar value) /// -/// \return Reference to \c left +/// \return Reference to \a `left` /// //////////////////////////////////////////////////////////// template @@ -339,12 +339,12 @@ constexpr Vector2& operator*=(Vector2& left, T right); //////////////////////////////////////////////////////////// /// \relates Vector2 -/// \brief Overload of binary operator / +/// \brief Overload of binary `operator/` /// /// \param left Left operand (a vector) /// \param right Right operand (a scalar value) /// -/// \return Memberwise division by \c right +/// \return Member-wise division by \a `right` /// //////////////////////////////////////////////////////////// template @@ -352,15 +352,15 @@ template //////////////////////////////////////////////////////////// /// \relates Vector2 -/// \brief Overload of binary operator /= +/// \brief Overload of binary `operator/=` /// -/// This operator performs a memberwise division by \c right, -/// and assigns the result to \c left. +/// This operator performs a member-wise division by \a `right`, +/// and assigns the result to \a `left`. /// /// \param left Left operand (a vector) /// \param right Right operand (a scalar value) /// -/// \return Reference to \c left +/// \return Reference to \a `left` /// //////////////////////////////////////////////////////////// template @@ -368,14 +368,14 @@ constexpr Vector2& operator/=(Vector2& left, T right); //////////////////////////////////////////////////////////// /// \relates Vector2 -/// \brief Overload of binary operator == +/// \brief Overload of binary `operator==` /// /// This operator compares strict equality between two vectors. /// /// \param left Left operand (a vector) /// \param right Right operand (a vector) /// -/// \return True if \c left is equal to \c right +/// \return `true` if \a `left` is equal to \a `right` /// //////////////////////////////////////////////////////////// template @@ -383,14 +383,14 @@ template //////////////////////////////////////////////////////////// /// \relates Vector2 -/// \brief Overload of binary operator != +/// \brief Overload of binary `operator!=` /// /// This operator compares strict difference between two vectors. /// /// \param left Left operand (a vector) /// \param right Right operand (a vector) /// -/// \return True if \c left is not equal to \c right +/// \return `true` if \a `left` is not equal to \a `right` /// //////////////////////////////////////////////////////////// template @@ -405,7 +405,7 @@ template /// \class sf::Vector2 /// \ingroup system /// -/// sf::Vector2 is a simple class that defines a mathematical +/// `sf::Vector2` is a simple class that defines a mathematical /// vector with two coordinates (x and y). It can be used to /// represent anything that has two dimensions: a size, a point, /// a velocity, a scale, etc. @@ -422,13 +422,13 @@ template /// results cannot be represented accurately with integers. /// The method documentation mentions "(floating-point)" in those cases. /// -/// You generally don't have to care about the templated form (sf::Vector2), +/// You generally don't have to care about the templated form (`sf::Vector2`), /// the most common specializations have special type aliases: -/// \li sf::Vector2 is sf::Vector2f -/// \li sf::Vector2 is sf::Vector2i -/// \li sf::Vector2 is sf::Vector2u +/// \li `sf::Vector2` is `sf::Vector2f` +/// \li `sf::Vector2` is `sf::Vector2i` +/// \li `sf::Vector2` is `sf::Vector2u` /// -/// The sf::Vector2 class has a simple interface, its x and y members +/// The `sf::Vector2` class has a simple interface, its x and y members /// can be accessed directly (there are no accessors like setX(), getX()). /// /// Usage example: @@ -446,6 +446,6 @@ template /// bool different = (v != u); /// \endcode /// -/// Note: for 3-dimensional vectors, see sf::Vector3. +/// Note: for 3-dimensional vectors, see `sf::Vector3`. /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/Vector3.hpp b/include/SFML/System/Vector3.hpp index 15820e5ca..78b0f874b 100644 --- a/include/SFML/System/Vector3.hpp +++ b/include/SFML/System/Vector3.hpp @@ -41,7 +41,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Default constructor /// - /// Creates a Vector3(0, 0, 0). + /// Creates a `Vector3(0, 0, 0)`. /// //////////////////////////////////////////////////////////// constexpr Vector3() = default; @@ -73,7 +73,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Length of the vector (floating-point). /// - /// If you are not interested in the actual length, but only in comparisons, consider using lengthSquared(). + /// If you are not interested in the actual length, but only in comparisons, consider using `lengthSquared()`. /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API T length() const; @@ -81,7 +81,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Square of vector's length. /// - /// Suitable for comparisons, more efficient than length(). + /// Suitable for comparisons, more efficient than `length()`. /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr T lengthSquared() const; @@ -89,7 +89,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Vector with same direction but length 1 (floating-point). /// - /// \pre \c *this is no zero vector. + /// \pre `*this` is no zero vector. /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_SYSTEM_API Vector3 normalized() const; @@ -107,9 +107,9 @@ public: [[nodiscard]] constexpr Vector3 cross(const Vector3& rhs) const; //////////////////////////////////////////////////////////// - /// \brief Component-wise multiplication of \c *this and \c rhs. + /// \brief Component-wise multiplication of `*this` and \a `rhs`. /// - /// Computes (lhs.x*rhs.x, lhs.y*rhs.y, lhs.z*rhs.z). + /// Computes `(lhs.x*rhs.x, lhs.y*rhs.y, lhs.z*rhs.z)`. /// /// Scaling is the most common use case for component-wise multiplication/division. /// This operation is also known as the Hadamard or Schur product. @@ -118,13 +118,13 @@ public: [[nodiscard]] constexpr Vector3 componentWiseMul(const Vector3& rhs) const; //////////////////////////////////////////////////////////// - /// \brief Component-wise division of \c *this and \c rhs. + /// \brief Component-wise division of `*this` and \a `rhs`. /// - /// Computes (lhs.x/rhs.x, lhs.y/rhs.y, lhs.z/rhs.z). + /// Computes `(lhs.x/rhs.x, lhs.y/rhs.y, lhs.z/rhs.z)`. /// /// Scaling is the most common use case for component-wise multiplication/division. /// - /// \pre Neither component of \c rhs is zero. + /// \pre Neither component of \a `rhs` is zero. /// //////////////////////////////////////////////////////////// [[nodiscard]] constexpr Vector3 componentWiseDiv(const Vector3& rhs) const; @@ -139,11 +139,11 @@ public: //////////////////////////////////////////////////////////// /// \relates Vector3 -/// \brief Overload of unary operator - +/// \brief Overload of unary `operator-` /// /// \param left Vector to negate /// -/// \return Memberwise opposite of the vector +/// \return Member-wise opposite of the vector /// //////////////////////////////////////////////////////////// template @@ -151,15 +151,15 @@ template //////////////////////////////////////////////////////////// /// \relates Vector3 -/// \brief Overload of binary operator += +/// \brief Overload of binary `operator+=` /// -/// This operator performs a memberwise addition of both vectors, -/// and assigns the result to \a left. +/// This operator performs a member-wise addition of both vectors, +/// and assigns the result to \a `left`. /// /// \param left Left operand (a vector) /// \param right Right operand (a vector) /// -/// \return Reference to \a left +/// \return Reference to \a `left` /// //////////////////////////////////////////////////////////// template @@ -167,15 +167,15 @@ constexpr Vector3& operator+=(Vector3& left, const Vector3& right); //////////////////////////////////////////////////////////// /// \relates Vector3 -/// \brief Overload of binary operator -= +/// \brief Overload of binary `operator-=` /// -/// This operator performs a memberwise subtraction of both vectors, -/// and assigns the result to \a left. +/// This operator performs a member-wise subtraction of both vectors, +/// and assigns the result to \a `left`. /// /// \param left Left operand (a vector) /// \param right Right operand (a vector) /// -/// \return Reference to \a left +/// \return Reference to \a `left` /// //////////////////////////////////////////////////////////// template @@ -183,12 +183,12 @@ constexpr Vector3& operator-=(Vector3& left, const Vector3& right); //////////////////////////////////////////////////////////// /// \relates Vector3 -/// \brief Overload of binary operator + +/// \brief Overload of binary `operator+` /// /// \param left Left operand (a vector) /// \param right Right operand (a vector) /// -/// \return Memberwise addition of both vectors +/// \return Member-wise addition of both vectors /// //////////////////////////////////////////////////////////// template @@ -196,12 +196,12 @@ template //////////////////////////////////////////////////////////// /// \relates Vector3 -/// \brief Overload of binary operator - +/// \brief Overload of binary `operator-` /// /// \param left Left operand (a vector) /// \param right Right operand (a vector) /// -/// \return Memberwise subtraction of both vectors +/// \return Member-wise subtraction of both vectors /// //////////////////////////////////////////////////////////// template @@ -209,12 +209,12 @@ template //////////////////////////////////////////////////////////// /// \relates Vector3 -/// \brief Overload of binary operator * +/// \brief Overload of binary `operator*` /// /// \param left Left operand (a vector) /// \param right Right operand (a scalar value) /// -/// \return Memberwise multiplication by \a right +/// \return Member-wise multiplication by \a `right` /// //////////////////////////////////////////////////////////// template @@ -222,12 +222,12 @@ template //////////////////////////////////////////////////////////// /// \relates Vector3 -/// \brief Overload of binary operator * +/// \brief Overload of binary `operator*` /// /// \param left Left operand (a scalar value) /// \param right Right operand (a vector) /// -/// \return Memberwise multiplication by \a left +/// \return Member-wise multiplication by \a `left` /// //////////////////////////////////////////////////////////// template @@ -235,15 +235,15 @@ template //////////////////////////////////////////////////////////// /// \relates Vector3 -/// \brief Overload of binary operator *= +/// \brief Overload of binary `operator*=` /// -/// This operator performs a memberwise multiplication by \a right, -/// and assigns the result to \a left. +/// This operator performs a member-wise multiplication by \a `right`, +/// and assigns the result to \a `left`. /// /// \param left Left operand (a vector) /// \param right Right operand (a scalar value) /// -/// \return Reference to \a left +/// \return Reference to \a `left` /// //////////////////////////////////////////////////////////// template @@ -251,12 +251,12 @@ constexpr Vector3& operator*=(Vector3& left, T right); //////////////////////////////////////////////////////////// /// \relates Vector3 -/// \brief Overload of binary operator / +/// \brief Overload of binary `operator/` /// /// \param left Left operand (a vector) /// \param right Right operand (a scalar value) /// -/// \return Memberwise division by \a right +/// \return Member-wise division by \a `right` /// //////////////////////////////////////////////////////////// template @@ -264,15 +264,15 @@ template //////////////////////////////////////////////////////////// /// \relates Vector3 -/// \brief Overload of binary operator /= +/// \brief Overload of binary `operator/=` /// -/// This operator performs a memberwise division by \a right, -/// and assigns the result to \a left. +/// This operator performs a member-wise division by \a `right`, +/// and assigns the result to \a `left`. /// /// \param left Left operand (a vector) /// \param right Right operand (a scalar value) /// -/// \return Reference to \a left +/// \return Reference to \a `left` /// //////////////////////////////////////////////////////////// template @@ -280,14 +280,14 @@ constexpr Vector3& operator/=(Vector3& left, T right); //////////////////////////////////////////////////////////// /// \relates Vector3 -/// \brief Overload of binary operator == +/// \brief Overload of binary `operator==` /// /// This operator compares strict equality between two vectors. /// /// \param left Left operand (a vector) /// \param right Right operand (a vector) /// -/// \return True if \a left is equal to \a right +/// \return `true` if \a `left` is equal to \a `right` /// //////////////////////////////////////////////////////////// template @@ -295,14 +295,14 @@ template //////////////////////////////////////////////////////////// /// \relates Vector3 -/// \brief Overload of binary operator != +/// \brief Overload of binary `operator!=` /// /// This operator compares strict difference between two vectors. /// /// \param left Left operand (a vector) /// \param right Right operand (a vector) /// -/// \return True if \a left is not equal to \a right +/// \return `true` if \a `left` is not equal to \a `right` /// //////////////////////////////////////////////////////////// template @@ -321,7 +321,7 @@ using Vector3f = Vector3; /// \class sf::Vector3 /// \ingroup system /// -/// sf::Vector3 is a simple class that defines a mathematical +/// `sf::Vector3` is a simple class that defines a mathematical /// vector with three coordinates (x, y and z). It can be used to /// represent anything that has three dimensions: a size, a point, /// a velocity, etc. @@ -334,13 +334,13 @@ using Vector3f = Vector3; /// results cannot be represented accurately with integers. /// The method documentation mentions "(floating-point)" in those cases. /// -/// You generally don't have to care about the templated form (sf::Vector3), +/// You generally don't have to care about the templated form (`sf::Vector3`), /// the most common specializations have special type aliases: -/// \li sf::Vector3 is sf::Vector3f -/// \li sf::Vector3 is sf::Vector3i +/// \li `sf::Vector3` is `sf::Vector3f` +/// \li `sf::Vector3` is `sf::Vector3i` /// -/// The sf::Vector3 class has a small and simple interface, its x, y and z members -/// can be accessed directly (there are no accessors like setX(), getX()). +/// The `sf::Vector3` class has a small and simple interface, its x, y and z members +/// can be accessed directly (there are no accessors like `setX()`, `getX()`). /// /// Usage example: /// \code @@ -358,6 +358,6 @@ using Vector3f = Vector3; /// bool different = (v != u); /// \endcode /// -/// Note: for 2-dimensional vectors, see sf::Vector2. +/// Note: for 2-dimensional vectors, see `sf::Vector2`. /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Clipboard.hpp b/include/SFML/Window/Clipboard.hpp index 02ce40527..918614953 100644 --- a/include/SFML/Window/Clipboard.hpp +++ b/include/SFML/Window/Clipboard.hpp @@ -45,9 +45,9 @@ namespace Clipboard /// /// This function returns the content of the clipboard /// as a string. If the clipboard does not contain string -/// it returns an empty sf::String object. +/// it returns an empty `sf::String` object. /// -/// \return Clipboard contents as sf::String object +/// \return Clipboard contents as `sf::String` object /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API String getString(); @@ -63,7 +63,7 @@ namespace Clipboard /// guaranteed to work if there is currently an /// open window for which events are being handled. /// -/// \param text sf::String containing the data to be sent +/// \param text `sf::String` containing the data to be sent /// to the clipboard /// //////////////////////////////////////////////////////////// @@ -77,7 +77,7 @@ SFML_WINDOW_API void setString(const String& text); /// \namespace sf::Clipboard /// \ingroup window /// -/// sf::Clipboard provides an interface for getting and +/// `sf::Clipboard` provides an interface for getting and /// setting the contents of the system clipboard. /// /// It is important to note that due to limitations on some @@ -109,6 +109,6 @@ SFML_WINDOW_API void setString(const String& text); /// } /// \endcode /// -/// \see sf::String, sf::Event +/// \see `sf::String`, `sf::Event` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Context.hpp b/include/SFML/Window/Context.hpp index 8eacc6419..a4e9ae36f 100644 --- a/include/SFML/Window/Context.hpp +++ b/include/SFML/Window/Context.hpp @@ -100,9 +100,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Activate or deactivate explicitly the context /// - /// \param active True to activate, false to deactivate + /// \param active `true` to activate, `false` to deactivate /// - /// \return True on success, false on failure + /// \return `true` on success, `false` on failure /// //////////////////////////////////////////////////////////// [[nodiscard]] bool setActive(bool active); @@ -124,7 +124,7 @@ public: /// /// \param name Name of the extension to check for /// - /// \return True if available, false if unavailable + /// \return `true` if available, `false` if unavailable /// //////////////////////////////////////////////////////////// [[nodiscard]] static bool isExtensionAvailable(std::string_view name); @@ -145,11 +145,11 @@ public: //////////////////////////////////////////////////////////// /// \brief Get the currently active context /// - /// This function will only return sf::Context objects. + /// This function will only return `sf::Context` objects. /// Contexts created e.g. by RenderTargets or for internal /// use will not be returned by this function. /// - /// \return The currently active context or a null pointer if none is active + /// \return The currently active context or `nullptr` if none is active /// //////////////////////////////////////////////////////////// [[nodiscard]] static const Context* getActiveContext(); @@ -201,7 +201,7 @@ private: /// if you create a new thread it will have no valid context /// by default. /// -/// To use a sf::Context instance, just construct it and let it +/// To use a `sf::Context` instance, just construct it and let it /// live as long as you need a valid context. No explicit activation /// is needed, all it has to do is to exist. Its destructor /// will take care of deactivating and freeing all the attached diff --git a/include/SFML/Window/ContextSettings.hpp b/include/SFML/Window/ContextSettings.hpp index 3cad4919b..f23378b4b 100644 --- a/include/SFML/Window/ContextSettings.hpp +++ b/include/SFML/Window/ContextSettings.hpp @@ -120,6 +120,6 @@ struct ContextSettings /// are not supported by the system; instead, SFML will try to /// find the closest valid match. You can then retrieve the /// settings that the window actually used to create its context, -/// with Window::getSettings(). +/// with `Window::getSettings()`. /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Cursor.hpp b/include/SFML/Window/Cursor.hpp index 977ecf870..0ccc400d8 100644 --- a/include/SFML/Window/Cursor.hpp +++ b/include/SFML/Window/Cursor.hpp @@ -56,29 +56,29 @@ public: /// Refer to the following table to determine which cursor /// is available on which platform. /// - /// Type | Linux | macOS | Windows | - /// ------------------------------------------|:-----:|:-----:|:--------:| - /// sf::Cursor::Type::Arrow | yes | yes | yes | - /// sf::Cursor::Type::ArrowWait | no | no | yes | - /// sf::Cursor::Type::Wait | yes | no | yes | - /// sf::Cursor::Type::Text | yes | yes | yes | - /// sf::Cursor::Type::Hand | yes | yes | yes | - /// sf::Cursor::Type::SizeHorizontal | yes | yes | yes | - /// sf::Cursor::Type::SizeVertical | yes | yes | yes | - /// sf::Cursor::Type::SizeTopLeftBottomRight | no | yes* | yes | - /// sf::Cursor::Type::SizeBottomLeftTopRight | no | yes* | yes | - /// sf::Cursor::Type::SizeLeft | yes | yes** | yes** | - /// sf::Cursor::Type::SizeRight | yes | yes** | yes** | - /// sf::Cursor::Type::SizeTop | yes | yes** | yes** | - /// sf::Cursor::Type::SizeBottom | yes | yes** | yes** | - /// sf::Cursor::Type::SizeTopLeft | yes | yes** | yes** | - /// sf::Cursor::Type::SizeTopRight | yes | yes** | yes** | - /// sf::Cursor::Type::SizeBottomLeft | yes | yes** | yes** | - /// sf::Cursor::Type::SizeBottomRight | yes | yes** | yes** | - /// sf::Cursor::Type::SizeAll | yes | no | yes | - /// sf::Cursor::Type::Cross | yes | yes | yes | - /// sf::Cursor::Type::Help | yes | yes* | yes | - /// sf::Cursor::Type::NotAllowed | yes | yes | yes | + /// Type | Linux | macOS | Windows | + /// --------------------------------------------|:-----:|:-----:|:--------:| + /// `sf::Cursor::Type::Arrow` | yes | yes | yes | + /// `sf::Cursor::Type::ArrowWait` | no | no | yes | + /// `sf::Cursor::Type::Wait` | yes | no | yes | + /// `sf::Cursor::Type::Text` | yes | yes | yes | + /// `sf::Cursor::Type::Hand` | yes | yes | yes | + /// `sf::Cursor::Type::SizeHorizontal` | yes | yes | yes | + /// `sf::Cursor::Type::SizeVertical` | yes | yes | yes | + /// `sf::Cursor::Type::SizeTopLeftBottomRight` | no | yes* | yes | + /// `sf::Cursor::Type::SizeBottomLeftTopRight` | no | yes* | yes | + /// `sf::Cursor::Type::SizeLeft` | yes | yes** | yes** | + /// `sf::Cursor::Type::SizeRight` | yes | yes** | yes** | + /// `sf::Cursor::Type::SizeTop` | yes | yes** | yes** | + /// `sf::Cursor::Type::SizeBottom` | yes | yes** | yes** | + /// `sf::Cursor::Type::SizeTopLeft` | yes | yes** | yes** | + /// `sf::Cursor::Type::SizeTopRight` | yes | yes** | yes** | + /// `sf::Cursor::Type::SizeBottomLeft` | yes | yes** | yes** | + /// `sf::Cursor::Type::SizeBottomRight` | yes | yes** | yes** | + /// `sf::Cursor::Type::SizeAll` | yes | no | yes | + /// `sf::Cursor::Type::Cross` | yes | yes | yes | + /// `sf::Cursor::Type::Help` | yes | yes* | yes | + /// `sf::Cursor::Type::NotAllowed` | yes | yes | yes | /// /// * These cursor types are undocumented so may not /// be available on all versions, but have been tested on 10.13 @@ -147,12 +147,12 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct a cursor with the provided image /// - /// \a pixels must be an array of \a width by \a height pixels - /// in 32-bit RGBA format. If not, this will cause undefined behavior. + /// \a `pixels` must be an array of \a `size` pixels in + /// 32-bit RGBA format. If not, this will cause undefined behavior. /// - /// If \a pixels is null or either \a width or \a height are 0, - /// the current cursor is left unchanged and the function will - /// return false. + /// If \a `pixels` is `nullptr` or either of \a `size`'s + /// properties are 0, the current cursor is left unchanged + /// and the function will return `false`. /// /// In addition to specifying the pixel data, you can also /// specify the location of the hotspot of the cursor. The @@ -180,7 +180,7 @@ public: /// \brief Create a native system cursor /// /// Refer to the list of cursor available on each system - /// (see sf::Cursor::Type) to know whether a given cursor is + /// (see `sf::Cursor::Type`) to know whether a given cursor is /// expected to load successfully or is not supported by /// the operating system. /// @@ -196,12 +196,12 @@ public: //////////////////////////////////////////////////////////// /// \brief Create a cursor with the provided image /// - /// \a pixels must be an array of \a width by \a height pixels + /// \a `pixels` must be an array of \a `size` pixels /// in 32-bit RGBA format. If not, this will cause undefined behavior. /// - /// If \a pixels is null or either \a width or \a height are 0, - /// the current cursor is left unchanged and the function will - /// return false. + /// If \a `pixels` is `nullptr` or either of \a `size`'s + /// properties are 0, the current cursor is left unchanged + /// and the function will return `false`. /// /// In addition to specifying the pixel data, you can also /// specify the location of the hotspot of the cursor. The @@ -229,7 +229,7 @@ public: /// \brief Create a native system cursor /// /// Refer to the list of cursor available on each system - /// (see sf::Cursor::Type) to know whether a given cursor is + /// (see `sf::Cursor::Type`) to know whether a given cursor is /// expected to load successfully or is not supported by /// the operating system. /// @@ -253,7 +253,7 @@ private: //////////////////////////////////////////////////////////// /// \brief Get access to the underlying implementation /// - /// This is primarily designed for sf::WindowBase::setMouseCursor, + /// This is primarily designed for `sf::WindowBase::setMouseCursor`, /// hence the friendship. /// /// \return a reference to the OS-specific implementation @@ -282,8 +282,8 @@ private: /// cursor. /// /// After loading the cursor graphical appearance -/// with either createFromPixels() or createFromSystem(), the -/// cursor can be changed with sf::WindowBase::setMouseCursor(). +/// with either `createFromPixels()` or `createFromSystem()`, the +/// cursor can be changed with `sf::WindowBase::setMouseCursor()`. /// /// The behavior is undefined if the cursor is destroyed while /// in use by the window. @@ -298,6 +298,6 @@ private: /// window.setMouseCursor(cursor); /// \endcode /// -/// \see sf::WindowBase::setMouseCursor +/// \see `sf::WindowBase::setMouseCursor` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Event.hpp b/include/SFML/Window/Event.hpp index a36733636..94052982d 100644 --- a/include/SFML/Window/Event.hpp +++ b/include/SFML/Window/Event.hpp @@ -167,7 +167,7 @@ public: /// single pixel, no MouseMoved event will be generated. In /// contrast, any movement information generated by the /// mouse independent of its sensor resolution will always - /// generate a MouseMovedRaw event. + /// generate a `MouseMovedRaw` event. /// /// In addition to screen resolution independence, raw /// mouse data also does not have mouse acceleration or @@ -297,7 +297,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct from a given `sf::Event` subtype /// - /// \tparam TEventSubtype Type of event subtype used to construct the event + /// \tparam `TEventSubtype` Type of event subtype used to construct the event /// /// \param eventSubtype Event subtype instance used to construct the event /// @@ -308,9 +308,9 @@ public: //////////////////////////////////////////////////////////// /// \brief Check current event subtype /// - /// \tparam TEventSubtype Type of the event subtype to check against + /// \tparam `TEventSubtype` Type of the event subtype to check against /// - /// \return True if the current event subtype matches given template parameter + /// \return `true` if the current event subtype matches given template parameter /// //////////////////////////////////////////////////////////// template @@ -319,7 +319,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Attempt to get specified event subtype /// - /// \tparam TEventSubtype Type of the desired event subtype + /// \tparam `TEventSubtype` Type of the desired event subtype /// /// \return Address of current event subtype, otherwise `nullptr` /// diff --git a/include/SFML/Window/Joystick.hpp b/include/SFML/Window/Joystick.hpp index 335647840..dd5005b86 100644 --- a/include/SFML/Window/Joystick.hpp +++ b/include/SFML/Window/Joystick.hpp @@ -79,7 +79,7 @@ struct SFML_WINDOW_API Identification /// /// \param joystick Index of the joystick to check /// -/// \return True if the joystick is connected, false otherwise +/// \return `true` if the joystick is connected, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool isConnected(unsigned int joystick); @@ -99,12 +99,12 @@ struct SFML_WINDOW_API Identification //////////////////////////////////////////////////////////// /// \brief Check if a joystick supports a given axis /// -/// If the joystick is not connected, this function returns false. +/// If the joystick is not connected, this function returns `false`. /// /// \param joystick Index of the joystick /// \param axis Axis to check /// -/// \return True if the joystick supports the axis, false otherwise +/// \return `true` if the joystick supports the axis, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool hasAxis(unsigned int joystick, Axis axis); @@ -112,12 +112,12 @@ struct SFML_WINDOW_API Identification //////////////////////////////////////////////////////////// /// \brief Check if a joystick button is pressed /// -/// If the joystick is not connected, this function returns false. +/// If the joystick is not connected, this function returns `false`. /// /// \param joystick Index of the joystick /// \param button Button to check /// -/// \return True if the button is pressed, false otherwise +/// \return `true` if the button is pressed, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool isButtonPressed(unsigned int joystick, unsigned int button); @@ -162,14 +162,14 @@ SFML_WINDOW_API void update(); /// \namespace sf::Joystick /// \ingroup window /// -/// sf::Joystick provides an interface to the state of the +/// `sf::Joystick` provides an interface to the state of the /// joysticks. Each joystick is identified by an index that /// is passed to the functions in this namespace. /// /// This namespace allows users to query the state of joysticks at any /// time and directly, without having to deal with a window and -/// its events. Compared to the JoystickMoved, JoystickButtonPressed -/// and JoystickButtonReleased events, sf::Joystick can retrieve the +/// its events. Compared to the `JoystickMoved`, `JoystickButtonPressed` +/// and `JoystickButtonReleased` events, `sf::Joystick` can retrieve the /// state of axes and buttons of joysticks at any time /// (you don't need to store and update a boolean on your side /// in order to know if a button is pressed or released), and you @@ -178,17 +178,17 @@ SFML_WINDOW_API void update(); /// and no event is triggered. /// /// SFML supports: -/// \li 8 joysticks (sf::Joystick::Count) -/// \li 32 buttons per joystick (sf::Joystick::ButtonCount) -/// \li 8 axes per joystick (sf::Joystick::AxisCount) +/// \li 8 joysticks (`sf::Joystick::Count`) +/// \li 32 buttons per joystick (`sf::Joystick::ButtonCount`) +/// \li 8 axes per joystick (`sf::Joystick::AxisCount`) /// /// Unlike the keyboard or mouse, the state of joysticks is sometimes -/// not directly available (depending on the OS), therefore an update() +/// not directly available (depending on the OS), therefore an `update()` /// function must be called in order to update the current state of /// joysticks. When you have a window with event handling, this is done /// automatically, you don't need to call anything. But if you have no /// window, or if you want to check joysticks state before creating one, -/// you must call sf::Joystick::update explicitly. +/// you must call `sf::Joystick::update` explicitly. /// /// Usage example: /// \code @@ -208,6 +208,6 @@ SFML_WINDOW_API void update(); /// float position = sf::Joystick::getAxisPosition(0, sf::Joystick::Axis::Y); /// \endcode /// -/// \see sf::Keyboard, sf::Mouse +/// \see `sf::Keyboard`, `sf::Mouse` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Keyboard.hpp b/include/SFML/Window/Keyboard.hpp index afa435fe8..6b625ce50 100644 --- a/include/SFML/Window/Keyboard.hpp +++ b/include/SFML/Window/Keyboard.hpp @@ -155,7 +155,7 @@ enum class Key }; //////////////////////////////////////////////////////////// -/// \brief The total number of keyboard keys, ignoring Key::Unknown +/// \brief The total number of keyboard keys, ignoring `Key::Unknown` /// //////////////////////////////////////////////////////////// // NOLINTNEXTLINE(readability-identifier-naming) @@ -329,7 +329,7 @@ enum class Scan using Scancode = Scan; //////////////////////////////////////////////////////////// -/// \brief The total number of scancodes, ignoring Scan::Unknown +/// \brief The total number of scancodes, ignoring `Scan::Unknown` /// //////////////////////////////////////////////////////////// // NOLINTNEXTLINE(readability-identifier-naming) @@ -340,7 +340,7 @@ static constexpr unsigned int ScancodeCount{static_cast(Scan::Laun /// /// \param key Key to check /// -/// \return True if the key is pressed, false otherwise +/// \return `true` if the key is pressed, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool isKeyPressed(Key key); @@ -350,7 +350,7 @@ static constexpr unsigned int ScancodeCount{static_cast(Scan::Laun /// /// \param code Scancode to check /// -/// \return True if the physical key is pressed, false otherwise +/// \return `true` if the physical key is pressed, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool isKeyPressed(Scancode code); @@ -362,10 +362,10 @@ static constexpr unsigned int ScancodeCount{static_cast(Scan::Laun /// /// \return The key corresponding to the scancode under the current /// keyboard layout used by the operating system, or -/// sf::Keyboard::Key::Unknown when the scancode cannot be mapped +/// `sf::Keyboard::Key::Unknown` when the scancode cannot be mapped /// to a Key. /// -/// \see delocalize +/// \see `delocalize` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API Key localize(Scancode code); @@ -377,10 +377,10 @@ static constexpr unsigned int ScancodeCount{static_cast(Scan::Laun /// /// \return The scancode corresponding to the key under the current /// keyboard layout used by the operating system, or -/// sf::Keyboard::Scan::Unknown when the key cannot be mapped -/// to a sf::Keyboard::Scancode. +/// `sf::Keyboard::Scan::Unknown` when the key cannot be mapped +/// to a `sf::Keyboard::Scancode`. /// -/// \see localize +/// \see `localize` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API Scancode delocalize(Key key); @@ -393,12 +393,12 @@ static constexpr unsigned int ScancodeCount{static_cast(Scan::Laun /// used in user interfaces, as the description for the key takes /// the users keyboard layout into consideration. /// -/// \warning The result is OS-dependent: for example, sf::Keyboard::Scan::LSystem +/// \warning The result is OS-dependent: for example, `sf::Keyboard::Scan::LSystem` /// is "Left Meta" on Linux, "Left Windows" on Windows and /// "Left Command" on macOS. /// /// The current keyboard layout set by the operating system is used to -/// interpret the scancode: for example, sf::Keyboard::Key::Semicolon is +/// interpret the scancode: for example, `sf::Keyboard::Key::Semicolon` is /// mapped to ";" for layout and to "é" for others. /// /// \param code Scancode to check @@ -418,7 +418,7 @@ static constexpr unsigned int ScancodeCount{static_cast(Scan::Laun /// If the virtual keyboard is not available, this function does /// nothing. /// -/// \param visible True to show, false to hide +/// \param visible `true` to show, `false` to hide /// //////////////////////////////////////////////////////////// SFML_WINDOW_API void setVirtualKeyboardVisible(bool visible); @@ -431,13 +431,13 @@ SFML_WINDOW_API void setVirtualKeyboardVisible(bool visible); /// \namespace sf::Keyboard /// \ingroup window /// -/// sf::Keyboard provides an interface to the state of the +/// `sf::Keyboard` provides an interface to the state of the /// keyboard. /// /// This namespace allows users to query the keyboard state at any /// time and directly, without having to deal with a window and -/// its events. Compared to the KeyPressed and KeyReleased events, -/// sf::Keyboard can retrieve the state of a key at any time +/// its events. Compared to the `KeyPressed` and `KeyReleased` events, +/// `sf::Keyboard` can retrieve the state of a key at any time /// (you don't need to store and update a boolean on your side /// in order to know if a key is pressed or released), and you /// always get the real state of the keyboard, even if keys are @@ -464,6 +464,6 @@ SFML_WINDOW_API void setVirtualKeyboardVisible(bool visible); /// } /// \endcode /// -/// \see sf::Joystick, sf::Mouse, sf::Touch +/// \see `sf::Joystick`, `sf::Mouse`, `sf::Touch` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Mouse.hpp b/include/SFML/Window/Mouse.hpp index 4e8e1adf6..528c420b5 100644 --- a/include/SFML/Window/Mouse.hpp +++ b/include/SFML/Window/Mouse.hpp @@ -71,12 +71,12 @@ enum class Wheel //////////////////////////////////////////////////////////// /// \brief Check if a mouse button is pressed /// -/// \warning Checking the state of buttons Mouse::Button::Extra1 and -/// Mouse::Button::Extra2 is not supported on Linux with X11. +/// \warning Checking the state of buttons `Mouse::Button::Extra1` and +/// `Mouse::Button::Extra2` is not supported on Linux with X11. /// /// \param button Button to check /// -/// \return True if the button is pressed, false otherwise +/// \return `true` if the button is pressed, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool isButtonPressed(Button button); @@ -136,13 +136,13 @@ SFML_WINDOW_API void setPosition(Vector2i position, const WindowBase& relativeTo /// \namespace sf::Mouse /// \ingroup window /// -/// sf::Mouse provides an interface to the state of the +/// `sf::Mouse` provides an interface to the state of the /// mouse. A single mouse is assumed. /// /// This namespace allows users to query the mouse state at any /// time and directly, without having to deal with a window and -/// its events. Compared to the MouseMoved, MouseButtonPressed -/// and MouseButtonReleased events, sf::Mouse can retrieve the +/// its events. Compared to the `MouseMoved`, `MouseButtonPressed` +/// and `MouseButtonReleased` events, `sf::Mouse` can retrieve the /// state of the cursor and the buttons at any time /// (you don't need to store and update a boolean on your side /// in order to know if a button is pressed or released), and you @@ -150,7 +150,7 @@ SFML_WINDOW_API void setPosition(Vector2i position, const WindowBase& relativeTo /// moved, pressed or released when your window is out of focus /// and no event is triggered. /// -/// The setPosition and getPosition functions can be used to change +/// The `setPosition` and `getPosition` functions can be used to change /// or retrieve the current position of the mouse pointer. There are /// two versions: one that operates in global coordinates (relative /// to the desktop) and one that operates in window coordinates @@ -170,6 +170,6 @@ SFML_WINDOW_API void setPosition(Vector2i position, const WindowBase& relativeTo /// sf::Mouse::setPosition(sf::Vector2i(100, 200), window); /// \endcode /// -/// \see sf::Joystick, sf::Keyboard, sf::Touch +/// \see `sf::Joystick`, `sf::Keyboard`, `sf::Touch` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Sensor.hpp b/include/SFML/Window/Sensor.hpp index a7389be26..149613179 100644 --- a/include/SFML/Window/Sensor.hpp +++ b/include/SFML/Window/Sensor.hpp @@ -59,7 +59,7 @@ static constexpr unsigned int Count{6}; //!< The total number of sensor types /// /// \param sensor Sensor to check /// -/// \return True if the sensor is available, false otherwise +/// \return `true` if the sensor is available, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool isAvailable(Type sensor); @@ -74,7 +74,7 @@ static constexpr unsigned int Count{6}; //!< The total number of sensor types /// This function does nothing if the sensor is unavailable. /// /// \param sensor Sensor to enable -/// \param enabled True to enable, false to disable +/// \param enabled `true` to enable, `false` to disable /// //////////////////////////////////////////////////////////// SFML_WINDOW_API void setEnabled(Type sensor, bool enabled); @@ -95,19 +95,19 @@ SFML_WINDOW_API void setEnabled(Type sensor, bool enabled); /// \namespace sf::Sensor /// \ingroup window /// -/// sf::Sensor provides an interface to the state of the +/// `sf::Sensor` provides an interface to the state of the /// various sensors that a device provides. /// /// This namespace allows users to query the sensors values at any /// time and directly, without having to deal with a window and -/// its events. Compared to the SensorChanged event, sf::Sensor +/// its events. Compared to the SensorChanged event, `sf::Sensor` /// can retrieve the state of a sensor at any time (you don't need to /// store and update its current value on your side). /// /// Depending on the OS and hardware of the device (phone, tablet, ...), /// some sensor types may not be available. You should always check /// the availability of a sensor before trying to read it, with the -/// sf::Sensor::isAvailable function. +/// `sf::Sensor::isAvailable` function. /// /// You may wonder why some sensor types look so similar, for example /// Accelerometer and Gravity / UserAcceleration. The first one @@ -119,7 +119,7 @@ SFML_WINDOW_API void setEnabled(Type sensor, bool enabled); /// This is exactly the same for Gyroscope vs Orientation. /// /// Because sensors consume a non-negligible amount of current, they are -/// all disabled by default. You must call sf::Sensor::setEnabled for each +/// all disabled by default. You must call `sf::Sensor::setEnabled` for each /// sensor in which you are interested. /// /// Usage example: diff --git a/include/SFML/Window/Touch.hpp b/include/SFML/Window/Touch.hpp index cfe779abd..f361a8dae 100644 --- a/include/SFML/Window/Touch.hpp +++ b/include/SFML/Window/Touch.hpp @@ -47,7 +47,7 @@ namespace Touch /// /// \param finger Finger index /// -/// \return True if \a finger is currently touching the screen, false otherwise +/// \return `true` if \a finger is currently touching the screen, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool isDown(unsigned int finger); @@ -87,13 +87,13 @@ namespace Touch /// \namespace sf::Touch /// \ingroup window /// -/// sf::Touch provides an interface to the state of the +/// `sf::Touch` provides an interface to the state of the /// touches. /// /// This namespace allows users to query the touches state at any /// time and directly, without having to deal with a window and -/// its events. Compared to the TouchBegan, TouchMoved -/// and TouchEnded events, sf::Touch can retrieve the +/// its events. Compared to the `TouchBegan`, `TouchMoved` +/// and `TouchEnded` events, `sf::Touch` can retrieve the /// state of the touches at any time (you don't need to store and /// update a boolean on your side in order to know if a touch is down), /// and you always get the real state of the touches, even if they @@ -126,6 +126,6 @@ namespace Touch /// sf::Vector2i relativePos = sf::Touch::getPosition(1, window); /// \endcode /// -/// \see sf::Joystick, sf::Keyboard, sf::Mouse +/// \see `sf::Joystick`, `sf::Keyboard`, `sf::Mouse` /// //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/VideoMode.hpp b/include/SFML/Window/VideoMode.hpp index 2ce64a136..d3fbdf2c0 100644 --- a/include/SFML/Window/VideoMode.hpp +++ b/include/SFML/Window/VideoMode.hpp @@ -37,7 +37,7 @@ namespace sf { //////////////////////////////////////////////////////////// -/// \brief VideoMode defines a video mode (width, height, bpp) +/// \brief VideoMode defines a video mode (size, bpp) /// //////////////////////////////////////////////////////////// class SFML_WINDOW_API VideoMode @@ -91,7 +91,7 @@ public: /// fullscreen windows; otherwise any video mode can be used /// with no restriction. /// - /// \return True if the video mode is valid for fullscreen mode + /// \return `true` if the video mode is valid for fullscreen mode /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isValid() const; @@ -105,72 +105,72 @@ public: //////////////////////////////////////////////////////////// /// \relates VideoMode -/// \brief Overload of == operator to compare two video modes +/// \brief Overload of `operator==` to compare two video modes /// /// \param left Left operand (a video mode) /// \param right Right operand (a video mode) /// -/// \return True if modes are equal +/// \return `true` if modes are equal /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool operator==(const VideoMode& left, const VideoMode& right); //////////////////////////////////////////////////////////// /// \relates VideoMode -/// \brief Overload of != operator to compare two video modes +/// \brief Overload of `operator!=` to compare two video modes /// /// \param left Left operand (a video mode) /// \param right Right operand (a video mode) /// -/// \return True if modes are different +/// \return `true` if modes are different /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool operator!=(const VideoMode& left, const VideoMode& right); //////////////////////////////////////////////////////////// /// \relates VideoMode -/// \brief Overload of < operator to compare video modes +/// \brief Overload of `operator<` to compare video modes /// /// \param left Left operand (a video mode) /// \param right Right operand (a video mode) /// -/// \return True if \a left is lesser than \a right +/// \return `true` if \a `left` is lesser than \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool operator<(const VideoMode& left, const VideoMode& right); //////////////////////////////////////////////////////////// /// \relates VideoMode -/// \brief Overload of > operator to compare video modes +/// \brief Overload of `operator>` to compare video modes /// /// \param left Left operand (a video mode) /// \param right Right operand (a video mode) /// -/// \return True if \a left is greater than \a right +/// \return `true` if \a `left` is greater than \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool operator>(const VideoMode& left, const VideoMode& right); //////////////////////////////////////////////////////////// /// \relates VideoMode -/// \brief Overload of <= operator to compare video modes +/// \brief Overload of `operator<=` to compare video modes /// /// \param left Left operand (a video mode) /// \param right Right operand (a video mode) /// -/// \return True if \a left is lesser or equal than \a right +/// \return `true` if \a `left` is lesser or equal than \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool operator<=(const VideoMode& left, const VideoMode& right); //////////////////////////////////////////////////////////// /// \relates VideoMode -/// \brief Overload of >= operator to compare video modes +/// \brief Overload of `operator>=` to compare video modes /// /// \param left Left operand (a video mode) /// \param right Right operand (a video mode) /// -/// \return True if \a left is greater or equal than \a right +/// \return `true` if \a `left` is greater or equal than \a `right` /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool operator>=(const VideoMode& left, const VideoMode& right); @@ -184,7 +184,7 @@ public: /// /// A video mode is defined by a width and a height (in pixels) /// and a depth (in bits per pixel). Video modes are used to -/// setup windows (sf::Window) at creation time. +/// setup windows (`sf::Window`) at creation time. /// /// The main usage of video modes is for fullscreen mode: /// indeed you must use one of the valid video modes @@ -192,15 +192,15 @@ public: /// and the graphics card support), otherwise your window /// creation will just fail. /// -/// sf::VideoMode provides a static function for retrieving +/// `sf::VideoMode` provides a static function for retrieving /// the list of all the video modes supported by the system: -/// getFullscreenModes(). +/// `getFullscreenModes()`. /// /// A custom video mode can also be checked directly for -/// fullscreen compatibility with its isValid() function. +/// fullscreen compatibility with its `isValid()` function. /// -/// Additionally, sf::VideoMode provides a static function -/// to get the mode currently used by the desktop: getDesktopMode(). +/// Additionally, `sf::VideoMode` provides a static function +/// to get the mode currently used by the desktop: `getDesktopMode()`. /// This allows to build windows with the same size or pixel /// depth as the current resolution. /// diff --git a/include/SFML/Window/Vulkan.hpp b/include/SFML/Window/Vulkan.hpp index b03d4df0a..d0c5393ce 100644 --- a/include/SFML/Window/Vulkan.hpp +++ b/include/SFML/Window/Vulkan.hpp @@ -66,16 +66,16 @@ namespace Vulkan /// \brief Tell whether or not the system supports Vulkan /// /// This function should always be called before using -/// the Vulkan features. If it returns false, then +/// the Vulkan features. If it returns `false`, then /// any attempt to use Vulkan will fail. /// -/// If only compute is required, set \a requireGraphics -/// to false to skip checking for the extensions necessary +/// If only compute is required, set \a `requireGraphics` +/// to `false` to skip checking for the extensions necessary /// for graphics rendering. /// /// \param requireGraphics /// -/// \return True if Vulkan is supported, false otherwise +/// \return `true` if Vulkan is supported, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] SFML_WINDOW_API bool isAvailable(bool requireGraphics = true); diff --git a/include/SFML/Window/Window.hpp b/include/SFML/Window/Window.hpp index 7923e246b..62e20a82d 100644 --- a/include/SFML/Window/Window.hpp +++ b/include/SFML/Window/Window.hpp @@ -59,7 +59,7 @@ public: /// \brief Default constructor /// /// This constructor doesn't actually create the window, - /// use the other constructors or call create() to do so. + /// use the other constructors or call `create()` to do so. /// //////////////////////////////////////////////////////////// Window(); @@ -68,10 +68,10 @@ public: /// \brief Construct a new window /// /// This constructor creates the window with the size and pixel - /// depth defined in \a mode. An optional style can be passed to + /// depth defined in \a `mode`. An optional style can be passed to /// customize the look and behavior of the window (borders, /// title bar, resizable, closable, ...). An optional state can - /// be provided. If \a state is State::Fullscreen, then \a mode + /// be provided. If \a `state` is `State::Fullscreen`, then \a `mode` /// must be a valid video mode. /// /// The last parameter is an optional structure specifying @@ -80,7 +80,7 @@ public: /// /// \param mode Video mode to use (defines the width, height and depth of the rendering area of the window) /// \param title Title of the window - /// \param style %Window style, a bitwise OR combination of sf::Style enumerators + /// \param style %Window style, a bitwise OR combination of `sf::Style` enumerators /// \param state %Window state /// \param settings Additional settings for the underlying OpenGL context /// @@ -95,11 +95,11 @@ public: /// \brief Construct a new window /// /// This constructor creates the window with the size and pixel - /// depth defined in \a mode. If \a state is State::Fullscreen, - /// then \a mode must be a valid video mode. + /// depth defined in \a `mode`. If \a `state` is `State::Fullscreen`, + /// then \a `mode` must be a valid video mode. /// /// The last parameter is an optional structure specifying - /// advanced OpenGL context settings such as antialiasing, + /// advanced OpenGL context settings such as anti-aliasing, /// depth-buffer bits, etc. /// /// \param mode Video mode to use (defines the width, height and depth of the rendering area of the window) @@ -117,7 +117,7 @@ public: /// rendering area into an already existing control. /// /// The second parameter is an optional structure specifying - /// advanced OpenGL context settings such as antialiasing, + /// advanced OpenGL context settings such as anti-aliasing, /// depth-buffer bits, etc. /// /// \param handle Platform-specific handle of the control @@ -162,12 +162,12 @@ public: /// \brief Create (or recreate) the window /// /// If the window was already created, it closes it first. - /// If \a state is State::Fullscreen, then \a mode must be + /// If \a `state` is `State::Fullscreen`, then \a `mode` must be /// a valid video mode. /// /// \param mode Video mode to use (defines the width, height and depth of the rendering area of the window) /// \param title Title of the window - /// \param style %Window style, a bitwise OR combination of sf::Style enumerators + /// \param style %Window style, a bitwise OR combination of `sf::Style` enumerators /// \param state %Window state /// //////////////////////////////////////////////////////////// @@ -177,16 +177,16 @@ public: /// \brief Create (or recreate) the window /// /// If the window was already created, it closes it first. - /// If \a state is State::Fullscreen, then \a mode must be + /// If \a `state` is `State::Fullscreen`, then \a `mode` must be /// a valid video mode. /// /// The last parameter is an optional structure specifying - /// advanced OpenGL context settings such as antialiasing, + /// advanced OpenGL context settings such as anti-aliasing, /// depth-buffer bits, etc. /// /// \param mode Video mode to use (defines the width, height and depth of the rendering area of the window) /// \param title Title of the window - /// \param style %Window style, a bitwise OR combination of sf::Style enumerators + /// \param style %Window style, a bitwise OR combination of `sf::Style` enumerators /// \param state %Window state /// \param settings Additional settings for the underlying OpenGL context /// @@ -213,7 +213,7 @@ public: /// If the window was already created, it closes it first. /// /// The second parameter is an optional structure specifying - /// advanced OpenGL context settings such as antialiasing, + /// advanced OpenGL context settings such as anti-aliasing, /// depth-buffer bits, etc. /// /// \param handle Platform-specific handle of the control @@ -225,10 +225,10 @@ public: //////////////////////////////////////////////////////////// /// \brief Close the window and destroy all the attached resources /// - /// After calling this function, the sf::Window instance remains - /// valid and you can call create() to recreate the window. - /// All other functions such as pollEvent() or display() will - /// still work (i.e. you don't have to test isOpen() every time), + /// After calling this function, the `sf::Window` instance remains + /// valid and you can call `create()` to recreate the window. + /// All other functions such as `pollEvent()` or `display()` will + /// still work (i.e. you don't have to test `isOpen()` every time), /// and will have no effect on closed windows. /// //////////////////////////////////////////////////////////// @@ -238,7 +238,7 @@ public: /// \brief Get the settings of the OpenGL context of the window /// /// Note that these settings may be different from what was - /// passed to the constructor or the create() function, + /// passed to the constructor or the `create()` function, /// if one or more settings were not supported. In this case, /// SFML chose the closest match. /// @@ -257,7 +257,7 @@ public: /// /// Vertical synchronization is disabled by default. /// - /// \param enabled True to enable v-sync, false to deactivate it + /// \param enabled `true` to enable v-sync, `false` to deactivate it /// //////////////////////////////////////////////////////////// void setVerticalSyncEnabled(bool enabled); @@ -266,10 +266,10 @@ public: /// \brief Limit the framerate to a maximum fixed frequency /// /// If a limit is set, the window will use a small delay after - /// each call to display() to ensure that the current frame + /// each call to `display()` to ensure that the current frame /// lasted long enough to match the framerate limit. /// SFML will try to match the given limit as much as it can, - /// but since it internally uses sf::sleep, whose precision + /// but since it internally uses `sf::sleep`, whose precision /// depends on the underlying OS, the results may be a little /// imprecise as well (for example, you can get 65 FPS when /// requesting 60). @@ -288,11 +288,11 @@ public: /// on the previous thread first if it was active. /// Only one window can be active on a thread at a time, thus /// the window previously active (if any) automatically gets deactivated. - /// This is not to be confused with requestFocus(). + /// This is not to be confused with `requestFocus()`. /// - /// \param active True to activate, false to deactivate + /// \param active `true` to activate, `false` to deactivate /// - /// \return True if operation was successful, false otherwise + /// \return `true` if operation was successful, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] bool setActive(bool active = true) const; @@ -329,25 +329,25 @@ private: /// \class sf::Window /// \ingroup window /// -/// sf::Window is the main class of the Window module. It defines +/// `sf::Window` is the main class of the Window module. It defines /// an OS window that is able to receive an OpenGL rendering. /// -/// A sf::Window can create its own new window, or be embedded into -/// an already existing control using the create(handle) function. +/// A `sf::Window` can create its own new window, or be embedded into +/// an already existing control using the `create(handle)` function. /// This can be useful for embedding an OpenGL rendering area into /// a view which is part of a bigger GUI with existing windows, /// controls, etc. It can also serve as embedding an OpenGL rendering /// area into a window created by another (probably richer) GUI library /// like Qt or wxWidgets. /// -/// The sf::Window class provides a simple interface for manipulating +/// The `sf::Window` class provides a simple interface for manipulating /// the window: move, resize, show/hide, control mouse cursor, etc. -/// It also provides event handling through its pollEvent() and waitEvent() +/// It also provides event handling through its `pollEvent()` and `waitEvent()` /// functions. /// -/// Note that OpenGL experts can pass their own parameters (antialiasing +/// Note that OpenGL experts can pass their own parameters (anti-aliasing /// level, bits for the depth and stencil buffers, etc.) to the -/// OpenGL context attached to the window, with the sf::ContextSettings +/// OpenGL context attached to the window, with the `sf::ContextSettings` /// structure which is passed as an optional argument when creating the /// window. /// @@ -355,7 +355,7 @@ private: /// and a powerful discrete GPU, the driver picks which GPU will run an /// SFML application. In order to inform the driver that an SFML application /// can benefit from being run on the more powerful discrete GPU, -/// #SFML_DEFINE_DISCRETE_GPU_PREFERENCE can be placed in a source file +/// `#SFML_DEFINE_DISCRETE_GPU_PREFERENCE` can be placed in a source file /// that is compiled and linked into the final application. The macro /// should be placed outside of any scopes in the global namespace. /// diff --git a/include/SFML/Window/WindowBase.hpp b/include/SFML/Window/WindowBase.hpp index 9c6b5521c..7161bed76 100644 --- a/include/SFML/Window/WindowBase.hpp +++ b/include/SFML/Window/WindowBase.hpp @@ -66,7 +66,7 @@ public: /// \brief Default constructor /// /// This constructor doesn't actually create the window, - /// use the other constructors or call create() to do so. + /// use the other constructors or call `create()` to do so. /// //////////////////////////////////////////////////////////// WindowBase(); @@ -75,15 +75,15 @@ public: /// \brief Construct a new window /// /// This constructor creates the window with the size and pixel - /// depth defined in \a mode. An optional style can be passed to + /// depth defined in \a `mode`. An optional style can be passed to /// customize the look and behavior of the window (borders, /// title bar, resizable, closable, ...). An optional state can - /// be provided. If \a state is State::Fullscreen, then \a mode + /// be provided. If \a `state` is `State::Fullscreen`, then \a `mode` /// must be a valid video mode. /// /// \param mode Video mode to use (defines the width, height and depth of the rendering area of the window) /// \param title Title of the window - /// \param style %Window style, a bitwise OR combination of sf::Style enumerators + /// \param style %Window style, a bitwise OR combination of `sf::Style` enumerators /// \param state %Window state /// //////////////////////////////////////////////////////////// @@ -93,7 +93,7 @@ public: /// \brief Construct a new window /// /// This constructor creates the window with the size and pixel - /// depth defined in \a mode. + /// depth defined in \a `mode`. /// /// \param mode Video mode to use (defines the width, height and depth of the rendering area of the window) /// \param title Title of the window @@ -146,12 +146,12 @@ public: /// \brief Create (or recreate) the window /// /// If the window was already created, it closes it first. - /// If \a state is State::Fullscreen, then \a mode must be + /// If \a `state` is `State::Fullscreen`, then \a `mode` must be /// a valid video mode. /// /// \param mode Video mode to use (defines the width, height and depth of the rendering area of the window) /// \param title Title of the window - /// \param style %Window style, a bitwise OR combination of sf::Style enumerators + /// \param style %Window style, a bitwise OR combination of `sf::Style` enumerators /// \param state %Window state /// //////////////////////////////////////////////////////////// @@ -168,10 +168,10 @@ public: //////////////////////////////////////////////////////////// /// \brief Close the window and destroy all the attached resources /// - /// After calling this function, the sf::Window instance remains - /// valid and you can call create() to recreate the window. - /// All other functions such as pollEvent() or display() will - /// still work (i.e. you don't have to test isOpen() every time), + /// After calling this function, the `sf::Window` instance remains + /// valid and you can call `create()` to recreate the window. + /// All other functions such as `pollEvent()` or `display()` will + /// still work (i.e. you don't have to test `isOpen()` every time), /// and will have no effect on closed windows. /// //////////////////////////////////////////////////////////// @@ -181,10 +181,10 @@ public: /// \brief Tell whether or not the window is open /// /// This function returns whether or not the window exists. - /// Note that a hidden window (setVisible(false)) is open - /// (therefore this function would return true). + /// Note that a hidden window (`setVisible(false)`) is open + /// (therefore this function would return `true`). /// - /// \return True if the window is open, false if it has been closed + /// \return `true` if the window is open, `false` if it has been closed /// //////////////////////////////////////////////////////////// [[nodiscard]] bool isOpen() const; @@ -206,7 +206,7 @@ public: /// /// \return The event, otherwise `std::nullopt` if no events are pending /// - /// \see waitEvent, handleEvents + /// \see `waitEvent`, `handleEvents` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::optional pollEvent(); @@ -232,7 +232,7 @@ public: /// /// \return The event, otherwise `std::nullopt` on timeout or if window was closed /// - /// \see pollEvent, handleEvents + /// \see `pollEvent`, `handleEvents` /// //////////////////////////////////////////////////////////// [[nodiscard]] std::optional waitEvent(Time timeout = Time::Zero); @@ -246,7 +246,7 @@ public: /// This function can take a variadic list of event handlers that /// each take a concrete event type as a single parameter. The event /// handlers can be any kind of callable object that has an - /// operator() defined for a specific event type. Additionally a + /// `operator()` defined for a specific event type. Additionally a /// generic callable can also be provided that will be invoked for /// every event type. If both types of callables are provided, the /// callables taking concrete event types will be preferred over the @@ -309,7 +309,7 @@ public: /// /// \param handlers A variadic list of callables that take a specific event as their only parameter /// - /// \see waitEvent, pollEvent + /// \see `waitEvent`, `pollEvent` /// //////////////////////////////////////////////////////////// template @@ -320,7 +320,7 @@ public: /// /// \return Position of the window, in pixels /// - /// \see setPosition + /// \see `setPosition` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2i getPosition() const; @@ -334,7 +334,7 @@ public: /// /// \param position New position, in pixels /// - /// \see getPosition + /// \see `getPosition` /// //////////////////////////////////////////////////////////// void setPosition(Vector2i position); @@ -347,7 +347,7 @@ public: /// /// \return Size in pixels /// - /// \see setSize + /// \see `setSize` /// //////////////////////////////////////////////////////////// [[nodiscard]] Vector2u getSize() const; @@ -357,7 +357,7 @@ public: /// /// \param size New size, in pixels /// - /// \see getSize + /// \see `getSize` /// //////////////////////////////////////////////////////////// void setSize(Vector2u size); @@ -387,7 +387,7 @@ public: /// /// \param title New title /// - /// \see setIcon + /// \see `setIcon` /// //////////////////////////////////////////////////////////// void setTitle(const String& title); @@ -395,7 +395,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Change the window's icon /// - /// \a pixels must be an array of \a width x \a height pixels + /// \a `pixels` must be an array of \a `size` pixels /// in 32-bits RGBA format. /// /// The OS default icon is used by default. @@ -405,7 +405,7 @@ public: /// pixels are copied, so you need not keep the /// source alive after calling this function. /// - /// \see setTitle + /// \see `setTitle` /// //////////////////////////////////////////////////////////// void setIcon(Vector2u size, const std::uint8_t* pixels); @@ -415,7 +415,7 @@ public: /// /// The window is shown by default. /// - /// \param visible True to show the window, false to hide it + /// \param visible `true` to show the window, `false` to hide it /// //////////////////////////////////////////////////////////// void setVisible(bool visible); @@ -425,7 +425,7 @@ public: /// /// The mouse cursor is visible by default. /// - /// \param visible True to show the mouse cursor, false to hide it + /// \param visible `true` to show the mouse cursor, `false` to hide it /// //////////////////////////////////////////////////////////// void setMouseCursorVisible(bool visible); @@ -438,7 +438,7 @@ public: /// Note that grabbing is only active while the window has /// focus. /// - /// \param grabbed True to enable, false to disable + /// \param grabbed `true` to enable, `false` to disable /// //////////////////////////////////////////////////////////// void setMouseCursorGrabbed(bool grabbed); @@ -456,8 +456,7 @@ public: /// /// \param cursor Native system cursor type to display /// - /// \see sf::Cursor::createFromSystem - /// \see sf::Cursor::createFromPixels + /// \see `sf::Cursor::createFromSystem`, `sf::Cursor::createFromPixels` /// //////////////////////////////////////////////////////////// void setMouseCursor(const Cursor& cursor); @@ -471,7 +470,7 @@ public: /// /// Key repeat is enabled by default. /// - /// \param enabled True to enable, false to disable + /// \param enabled `true` to enable, `false` to disable /// //////////////////////////////////////////////////////////// void setKeyRepeatEnabled(bool enabled); @@ -498,9 +497,9 @@ public: /// If a window requests focus, it only hints to the operating /// system, that it would like to be focused. The operating system /// is free to deny the request. - /// This is not to be confused with setActive(). + /// This is not to be confused with `setActive()`. /// - /// \see hasFocus + /// \see `hasFocus` /// //////////////////////////////////////////////////////////// void requestFocus(); @@ -512,8 +511,8 @@ public: /// to receive input events such as keystrokes or most mouse /// events. /// - /// \return True if window has focus, false otherwise - /// \see requestFocus + /// \return `true` if window has focus, `false` otherwise + /// \see `requestFocus` /// //////////////////////////////////////////////////////////// [[nodiscard]] bool hasFocus() const; @@ -521,7 +520,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Get the OS-specific handle of the window /// - /// The type of the returned handle is sf::WindowHandle, + /// The type of the returned handle is `sf::WindowHandle`, /// which is a type alias to the handle type defined by the OS. /// You shouldn't need to use this function, unless you have /// very specific stuff to implement that SFML doesn't support, @@ -539,7 +538,7 @@ public: /// \param surface Created surface /// \param allocator Allocator to use /// - /// \return True if surface creation was successful, false otherwise + /// \return `true` if surface creation was successful, `false` otherwise /// //////////////////////////////////////////////////////////// [[nodiscard]] bool createVulkanSurface(const VkInstance& instance, @@ -573,7 +572,7 @@ private: /// \brief Processes an event before it is sent to the user /// /// This function is called every time an event is received - /// from the internal window (through pollEvent or waitEvent). + /// from the internal window (through `pollEvent` or `waitEvent`). /// It filters out unwanted events, and performs whatever internal /// stuff the window needs before the event is returned to the /// user. @@ -604,14 +603,14 @@ private: /// \class sf::WindowBase /// \ingroup window /// -/// sf::WindowBase serves as the base class for all Windows. +/// `sf::WindowBase` serves as the base class for all Windows. /// -/// A sf::WindowBase can create its own new window, or be embedded into -/// an already existing control using the create(handle) function. +/// A `sf::WindowBase` can create its own new window, or be embedded into +/// an already existing control using the `create(handle)` function. /// -/// The sf::WindowBase class provides a simple interface for manipulating +/// The `sf::WindowBase` class provides a simple interface for manipulating /// the window: move, resize, show/hide, control mouse cursor, etc. -/// It also provides event handling through its pollEvent() and waitEvent() +/// It also provides event handling through its `pollEvent()` and `waitEvent()` /// functions. /// /// Usage example: diff --git a/include/SFML/Window/WindowHandle.hpp b/include/SFML/Window/WindowHandle.hpp index 3fe13b08e..e2c06ef46 100644 --- a/include/SFML/Window/WindowHandle.hpp +++ b/include/SFML/Window/WindowHandle.hpp @@ -89,10 +89,10 @@ using WindowHandle = "platform-specific"; /// /// \par macOS Specification /// -/// On macOS, a sf::Window can be created either from an +/// On macOS, a `sf::Window` can be created either from an /// existing \p NSWindow* or an \p NSView*. When the window /// is created from a window, SFML will use its content view -/// as the OpenGL area. sf::Window::getNativeHandle() will +/// as the OpenGL area. `sf::Window::getNativeHandle()` will /// return the handle that was used to create the window, /// which is a \p NSWindow* by default. /// diff --git a/src/SFML/Audio/AudioDevice.hpp b/src/SFML/Audio/AudioDevice.hpp index 40491d29c..a73c39138 100644 --- a/src/SFML/Audio/AudioDevice.hpp +++ b/src/SFML/Audio/AudioDevice.hpp @@ -373,7 +373,7 @@ private: std::optional m_log; //!< The miniaudio log std::optional m_context; //!< The miniaudio context std::optional m_playbackDevice; //!< The miniaudio playback device - std::optional m_engine; //!< The miniaudio engine (used for effects and spatialisation) + std::optional m_engine; //!< The miniaudio engine (used for effects and spatialization) ResourceEntryList m_resources; //!< Registered resources std::mutex m_resourcesMutex; //!< The mutex guarding the registered resources }; diff --git a/src/SFML/Window/DRM/DRMContext.hpp b/src/SFML/Window/DRM/DRMContext.hpp index 227d758c1..ddb4f5a04 100644 --- a/src/SFML/Window/DRM/DRMContext.hpp +++ b/src/SFML/Window/DRM/DRMContext.hpp @@ -63,7 +63,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Create a new context, not associated to a window /// - /// \param shared Context to share the new one with (can be nullptr) + /// \param shared Context to share the new one with (can be `nullptr`) /// //////////////////////////////////////////////////////////// DRMContext(DRMContext* shared); @@ -128,7 +128,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Create the EGL context /// - /// \param shared Context to share the new one with (can be nullptr) + /// \param shared Context to share the new one with (can be `nullptr`) /// \param bitsPerPixel Pixel depth, in bits per pixel /// \param settings Creation parameters /// diff --git a/src/SFML/Window/VulkanImpl.hpp b/src/SFML/Window/VulkanImpl.hpp index 48ab85c83..a9da730a1 100644 --- a/src/SFML/Window/VulkanImpl.hpp +++ b/src/SFML/Window/VulkanImpl.hpp @@ -58,7 +58,7 @@ namespace sf::priv::VulkanImpl /// /// \param name Name of the function to get the address of /// -/// \return Address of the Vulkan function, nullptr on failure +/// \return Address of the Vulkan function, `nullptr` on failure /// //////////////////////////////////////////////////////////// [[nodiscard]] VulkanFunctionPointer getFunction(const char* name); diff --git a/src/SFML/Window/macOS/HIDInputManager.hpp b/src/SFML/Window/macOS/HIDInputManager.hpp index b013fa610..52397b11f 100644 --- a/src/SFML/Window/macOS/HIDInputManager.hpp +++ b/src/SFML/Window/macOS/HIDInputManager.hpp @@ -98,7 +98,7 @@ public: //////////////////////////////////////////////////////////// /// \brief Try to convert a character into a SFML key code /// - /// Return sf::Keyboard::Key::Unknown if it doesn't match any 'localized' keys. + /// Return `sf::Keyboard::Key::Unknown` if it doesn't match any 'localized' keys. /// /// By 'localized' we mean keys that depend on the keyboard layout /// and might not be the same as the US keycode for some countries @@ -122,7 +122,7 @@ public: /// \brief Try to convert a virtual keycode (HID level) into a /// SFML scancode. /// - /// Return sf::Keyboard::Scan::Unknown if the keycode is unknown. + /// Return `sf::Keyboard::Scan::Unknown` if the keycode is unknown. /// //////////////////////////////////////////////////////////// static Keyboard::Scancode nonLocalizedKey(UniChar virtualKeycode);