Updated documentation

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1241 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2009-10-17 08:50:13 +00:00
parent b2dfcf9d0c
commit 39a8ba4c52
10 changed files with 614 additions and 510 deletions

View file

@ -124,7 +124,7 @@ public :
/// This can avoid some visual artifacts, and limit the framerate
/// to a good value (but not constant across different computers).
///
/// \param enabled : True to enable v-sync, false to deactivate
/// \param enabled True to enable v-sync, false to deactivate
///
////////////////////////////////////////////////////////////
virtual void UseVerticalSync(bool enabled) = 0;

View file

@ -45,8 +45,6 @@ namespace
namespace sf
{
////////////////////////////////////////////////////////////
/// Default constructor
////////////////////////////////////////////////////////////
Window::Window() :
myWindow (NULL),
myContext (NULL),
@ -60,8 +58,6 @@ mySetCursorPosY (0xFFFF)
}
////////////////////////////////////////////////////////////
/// Construct a new window
////////////////////////////////////////////////////////////
Window::Window(VideoMode mode, const std::string& title, unsigned long style, const ContextSettings& settings) :
myWindow (NULL),
@ -76,8 +72,6 @@ mySetCursorPosY (0xFFFF)
}
////////////////////////////////////////////////////////////
/// Construct the window from an existing control
////////////////////////////////////////////////////////////
Window::Window(WindowHandle handle, const ContextSettings& settings) :
myWindow (NULL),
@ -92,8 +86,6 @@ mySetCursorPosY (0xFFFF)
}
////////////////////////////////////////////////////////////
/// Destructor
////////////////////////////////////////////////////////////
Window::~Window()
{
@ -101,8 +93,6 @@ Window::~Window()
}
////////////////////////////////////////////////////////////
/// Create the window
////////////////////////////////////////////////////////////
void Window::Create(VideoMode mode, const std::string& title, unsigned long style, const ContextSettings& settings)
{
@ -154,8 +144,6 @@ void Window::Create(VideoMode mode, const std::string& title, unsigned long styl
}
////////////////////////////////////////////////////////////
/// Create the window from an existing control
////////////////////////////////////////////////////////////
void Window::Create(WindowHandle handle, const ContextSettings& settings)
{
@ -177,10 +165,6 @@ void Window::Create(WindowHandle handle, const ContextSettings& settings)
}
////////////////////////////////////////////////////////////
/// Close (destroy) the window.
/// The sf::Window instance remains valid and you can call
/// Create to recreate the window
////////////////////////////////////////////////////////////
void Window::Close()
{
@ -204,10 +188,6 @@ void Window::Close()
}
////////////////////////////////////////////////////////////
/// Tell whether or not the window is opened (ie. has been created).
/// Note that a hidden window (Show(false))
/// will still return true
////////////////////////////////////////////////////////////
bool Window::IsOpened() const
{
@ -215,8 +195,6 @@ bool Window::IsOpened() const
}
////////////////////////////////////////////////////////////
/// Get the width of the rendering region of the window
////////////////////////////////////////////////////////////
unsigned int Window::GetWidth() const
{
@ -224,8 +202,6 @@ unsigned int Window::GetWidth() const
}
////////////////////////////////////////////////////////////
/// Get the height of the rendering region of the window
////////////////////////////////////////////////////////////
unsigned int Window::GetHeight() const
{
@ -233,8 +209,6 @@ unsigned int Window::GetHeight() const
}
////////////////////////////////////////////////////////////
/// Get the creation settings of the window
////////////////////////////////////////////////////////////
const ContextSettings& Window::GetSettings() const
{
@ -244,8 +218,6 @@ const ContextSettings& Window::GetSettings() const
}
////////////////////////////////////////////////////////////
/// Get the event on top of events stack, if any
////////////////////////////////////////////////////////////
bool Window::GetEvent(Event& event)
{
@ -266,8 +238,6 @@ bool Window::GetEvent(Event& event)
}
////////////////////////////////////////////////////////////
/// Enable / disable vertical synchronization
////////////////////////////////////////////////////////////
void Window::UseVerticalSync(bool enabled)
{
@ -276,8 +246,6 @@ void Window::UseVerticalSync(bool enabled)
}
////////////////////////////////////////////////////////////
/// Show or hide the mouse cursor
////////////////////////////////////////////////////////////
void Window::ShowMouseCursor(bool show)
{
@ -286,8 +254,6 @@ void Window::ShowMouseCursor(bool show)
}
////////////////////////////////////////////////////////////
/// Change the position of the mouse cursor
////////////////////////////////////////////////////////////
void Window::SetCursorPosition(unsigned int left, unsigned int top)
{
@ -302,8 +268,6 @@ void Window::SetCursorPosition(unsigned int left, unsigned int top)
}
////////////////////////////////////////////////////////////
/// Change the position of the window on screen
////////////////////////////////////////////////////////////
void Window::SetPosition(int left, int top)
{
@ -312,8 +276,6 @@ void Window::SetPosition(int left, int top)
}
////////////////////////////////////////////////////////////
/// Change the size of the rendering region of the window
////////////////////////////////////////////////////////////
void Window::SetSize(unsigned int width, unsigned int height)
{
@ -322,8 +284,6 @@ void Window::SetSize(unsigned int width, unsigned int height)
}
////////////////////////////////////////////////////////////
/// Show or hide the window
////////////////////////////////////////////////////////////
void Window::Show(bool show)
{
@ -332,9 +292,6 @@ void Window::Show(bool show)
}
////////////////////////////////////////////////////////////
/// Enable or disable automatic key-repeat.
/// Automatic key-repeat is enabled by default
////////////////////////////////////////////////////////////
void Window::EnableKeyRepeat(bool enabled)
{
@ -343,8 +300,6 @@ void Window::EnableKeyRepeat(bool enabled)
}
////////////////////////////////////////////////////////////
/// Change the window's icon
////////////////////////////////////////////////////////////
void Window::SetIcon(unsigned int width, unsigned int height, const Uint8* pixels)
{
@ -353,9 +308,6 @@ void Window::SetIcon(unsigned int width, unsigned int height, const Uint8* pixel
}
////////////////////////////////////////////////////////////
/// Activate or deactivate the window as the current target
/// for rendering
////////////////////////////////////////////////////////////
bool Window::SetActive(bool active) const
{
@ -378,8 +330,6 @@ bool Window::SetActive(bool active) const
}
////////////////////////////////////////////////////////////
/// Display the window on screen
////////////////////////////////////////////////////////////
void Window::Display()
{
@ -407,8 +357,6 @@ void Window::Display()
}
////////////////////////////////////////////////////////////
/// Get the input manager of the window
////////////////////////////////////////////////////////////
const Input& Window::GetInput() const
{
@ -417,16 +365,11 @@ const Input& Window::GetInput() const
////////////////////////////////////////////////////////////
/// Set the framerate at a fixed frequency
////////////////////////////////////////////////////////////
void Window::SetFramerateLimit(unsigned int limit)
{
myFramerateLimit = limit;
}
////////////////////////////////////////////////////////////
/// Get time elapsed since last frame
////////////////////////////////////////////////////////////
float Window::GetFrameTime() const
{
@ -434,9 +377,6 @@ float Window::GetFrameTime() const
}
////////////////////////////////////////////////////////////
/// Change the joystick threshold, ie. the value below which
/// no move event will be generated
////////////////////////////////////////////////////////////
void Window::SetJoystickThreshold(float threshold)
{
@ -445,8 +385,6 @@ void Window::SetJoystickThreshold(float threshold)
}
////////////////////////////////////////////////////////////
/// Called after the window has been created
////////////////////////////////////////////////////////////
void Window::OnCreate()
{
@ -454,8 +392,6 @@ void Window::OnCreate()
}
////////////////////////////////////////////////////////////
/// Called before the window has been displayed
////////////////////////////////////////////////////////////
void Window::OnDisplay()
{
@ -463,8 +399,6 @@ void Window::OnDisplay()
}
////////////////////////////////////////////////////////////
/// Receive an event from window
////////////////////////////////////////////////////////////
void Window::OnEvent(const Event& event)
{
@ -482,8 +416,6 @@ void Window::OnEvent(const Event& event)
}
////////////////////////////////////////////////////////////
/// Do some common internal initializations
////////////////////////////////////////////////////////////
void Window::Initialize()
{

View file

@ -166,8 +166,8 @@ public :
////////////////////////////////////////////////////////////
/// \brief Change the size of the rendering region of the window
///
/// \param width New width
/// \param height New height
/// \param width New width, in pixels
/// \param height New height, in pixels
///
////////////////////////////////////////////////////////////
virtual void SetSize(unsigned int width, unsigned int height) = 0;