Permalink
Browse files

Updated changelog, authors. Fixed 'override' warnings. Use stdc++ ins…

…tead of libc++ for clang. Version bump to 0.3.0. Included missing cmath header.
  • Loading branch information...
TankOs committed May 20, 2015
1 parent 02e34e0 commit 6f4a009337f8ded28b7ac4724cddbbf1966013b8
View
@@ -15,3 +15,5 @@ firefly2442 (https://github.com/firefly2442/SFGUI)
Stefan Hendriks (https://github.com/stefanhendriks)
Dematos
Pierre Adam (https://github.com/PierreAdam)
+eXpl0it3r (https://github.com/eXpl0it3r)
+Zax37 (https://github.com/Zax37)
View
@@ -1,5 +1,55 @@
Changelog for SFGUI, http://sfgui.sfml-dev.de/
+0.3.0
+
+Fixes:
+ - Added GLSL version check to NonLegacyRenderer::IsAvailable().
+ - Added missing CMake parameter quoting.
+ - Fixed Visual Studio compile error.
+ - Fixed crash when using a Notebook with no tabs.
+ - Fixed sfg::Canvas not clearing properly.
+ - Fixed test example files not being copied properly.
+ - Fixed example GUIs not being rendered for a brief period of time when run,
+ moved example theme specification blocks before widget creation to reflect
+ the recommended sequence of constructing the GUI in order to reduce the
+ time required to construct the GUI.
+ - Fixed building shared library in Visual Studio due to std::vector being
+ specified with an incomplete type, made selecting SFML's link type separate
+ from selecting SFGUI's link type, renamed "test" example to "SFGUI-Test" in
+ order to fix a CMake policy warning.
+ - Fixed errors compiling with Visual Studio, fixed warnings about
+ struct/class forward declaration mismatches, got rid of empty
+ ResourceLoader translation unit.
+ - Fixed broken GLX linking.
+ - Fixed glX symbols not being found because was X11 not being linked on
+ Linux, rewrote the FindSFGUI.cmake script.
+ - Fixed Scrollbars not calculating their slider size properly based on the
+ adjustment values, fixed ScrolledWindow sometimes displaying 2 scrollbars
+ instead of only 1 when both are set to automatic and the child viewport is
+ expanded
+ - Fixed SFGUI crashing when connecting a widget to an adjustment and letting
+ the widget get destroyed before the adjustment.
+ - Fixed ScrolledWindow not causing child scrollbars to resize properly,
+ prevented being able to overwrite ScrolledWindow viewport with another even
+ if it isn't added to the container.
+ - Fixed ComboBox trying to select entries with a negative index
+ - Added quotes to CMakeLists.txts where strings with spaces might occur
+ - Fixed static linking and added support for static runtime library.
+ - Fixed clang compiler flags.
+
+Enhancements:
+ - Replaced GLEW with a glLoadGen loader, got rid of GLU dependency.
+ - Implemented non-legacy renderer, moved all GL code out of Renderer and into
+ the Renderer implementations.
+ - Added window close button.
+ - Added custom widget example.
+ - Added support for getting/setting the SFML view of an sfg::Canvas.
+ - Implemented Clear(), Begin() and End() for ComboBoxes (including non-member
+ begin() and end() for native support of range-based for loops), renamed
+ some ComboBox methods and improved documentation, fixed ComboBox not
+ invalidating when elements were removed.
+ - Added support for LIB_SUFFIX on Linux.
+
0.2.3
Fixes:
View
@@ -2,23 +2,23 @@ cmake_minimum_required( VERSION 2.8 )
project( SFGUI )
set( SFGUI_MAJOR_VERSION 0 )
-set( SFGUI_MINOR_VERSION 2 )
-set( SFGUI_REVISION_VERSION 3 )
+set( SFGUI_MINOR_VERSION 3 )
+set( SFGUI_REVISION_VERSION 0 )
### USER INPUT ###
set( SFGUI_BUILD_SHARED_LIBS true CACHE BOOL "Build shared library." )
set( SFGUI_BUILD_EXAMPLES true CACHE BOOL "Build examples." )
set( SFGUI_BUILD_DOC false CACHE BOOL "Generate API documentation." )
set( SFGUI_INCLUDE_FONT true CACHE BOOL "Include default font in library (DejaVuSans)." )
-set( SFML_STATIC_LIBRARIES true CACHE BOOL "Do you want to link SFML statically?" )
+set( SFML_STATIC_LIBRARIES false CACHE BOOL "Do you want to link SFML statically?" )
# Tell CMake where to find additional find modules
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/" )
# Find packages.
find_package( OpenGL REQUIRED )
-find_package( SFML 2 REQUIRED COMPONENTS graphics window system )
+find_package( SFML 2.3 REQUIRED COMPONENTS graphics window system )
# Find X11 for glX on Linux, checking for UNIX would match other UNIX systems as well
if( "${CMAKE_SYSTEM_NAME}" MATCHES "Linux" )
@@ -280,10 +280,10 @@ else()
endif()
if( CMAKE_CXX_COMPILER MATCHES ".*clang[+][+]" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
- set( CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wunused-parameter -Wno-long-long -pedantic ${CMAKE_CXX_FLAGS}" )
+ set( CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wunused-parameter -Wno-long-long -pedantic ${CMAKE_CXX_FLAGS}" )
set( CMAKE_C_FLAGS "-Wall -Wextra -Wshadow -Wconversion -Wno-long-long -pedantic ${CMAKE_C_FLAGS}" )
elseif( CMAKE_COMPILER_IS_GNUCXX )
- set( CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wno-long-long -pedantic ${CMAKE_CXX_FLAGS}" )
+ set( CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wunused-parameter -Wno-long-long -pedantic ${CMAKE_CXX_FLAGS}" )
set( CMAKE_C_FLAGS "-Wall -Wextra -Wshadow -Wconversion -Wno-long-long -pedantic ${CMAKE_C_FLAGS}" )
endif()
@@ -105,8 +105,8 @@ if( SFGUI_FIND_VERSION AND SFGUI_INCLUDE_DIR )
set( SFGUI_VERSION_OK false )
endif()
else()
- # SFGUI version is < 0.2.3
- if( SFGUI_REQUESTED_VERSION GREATER 203 )
+ # SFGUI version is < 0.3.0
+ if( SFGUI_REQUESTED_VERSION GREATER 300 )
set( SFGUI_VERSION_OK false )
set( SFGUI_VERSION_MAJOR 0 )
set( SFGUI_VERSION_MINOR x )
View
@@ -7,6 +7,8 @@
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
+#include <cmath>
+
int main() {
// Create the main SFML window
sf::RenderWindow app_window( sf::VideoMode( 800, 600 ), "SFGUI Canvas Example", sf::Style::Titlebar | sf::Style::Close );
@@ -178,7 +178,7 @@ class MyCustomWidget : public sfg::Widget {
private:
// This handler handles mouse enter events.
- void HandleMouseEnter( int x, int y ) {
+ void HandleMouseEnter( int x, int y ) override {
SetLabel( sf::String( "Mouse Enter: " + std::to_string( x ) + "," + std::to_string( y ) ) );
if( GetState() == State::NORMAL ) {
@@ -187,7 +187,7 @@ class MyCustomWidget : public sfg::Widget {
}
// This handler handles mouse leave events.
- void HandleMouseLeave( int x, int y ) {
+ void HandleMouseLeave( int x, int y ) override {
SetLabel( sf::String( "Mouse Leave: " + std::to_string( x ) + "," + std::to_string( y ) ) );
if( GetState() == State::PRELIGHT ) {
View
@@ -90,9 +90,9 @@ class SFGUI_API Box : public Container {
Box( Orientation orientation = Orientation::HORIZONTAL, float spacing = 0.f );
bool HandleAdd( Widget::Ptr child ) override;
- void HandleRemove( Widget::Ptr child );
- void HandleSizeChange();
- void HandleRequisitionChange();
+ void HandleRemove( Widget::Ptr child ) override;
+ void HandleSizeChange() override;
+ void HandleRequisitionChange() override;
void AllocateChildren() const;
bool IsChildInteresting( Widget* child ) const;
View
@@ -58,13 +58,13 @@ class SFGUI_API Button : public Bin {
bool HandleAdd( Widget::Ptr child ) override;
- void HandleSizeChange();
+ void HandleSizeChange() override;
void HandleStateChange( State old_state ) override;
private:
- void HandleMouseEnter( int x, int y );
- void HandleMouseLeave( int x, int y );
+ void HandleMouseEnter( int x, int y ) override;
+ void HandleMouseLeave( int x, int y ) override;
void HandleMouseButtonEvent( sf::Mouse::Button button, bool press, int x, int y ) override;
void AllocateChild();
@@ -27,7 +27,7 @@ class SFGUI_API CheckButton : public ToggleButton {
std::unique_ptr<RenderQueue> InvalidateImpl() const override;
sf::Vector2f CalculateRequisition() override;
- void HandleSizeChange();
+ void HandleSizeChange() override;
};
}
View
@@ -1,8 +1,8 @@
#pragma once
#define SFGUI_MAJOR_VERSION 0
-#define SFGUI_MINOR_VERSION 2
-#define SFGUI_REVISION_VERSION 3
+#define SFGUI_MINOR_VERSION 3
+#define SFGUI_REVISION_VERSION 0
#if defined( _WIN32 ) || defined( __WIN32__ )
#define SFGUI_SYSTEM_WINDOWS
@@ -44,7 +44,7 @@ class SFGUI_API Container : public Widget {
*/
const WidgetsList& GetChildren() const;
- void Refresh();
+ void Refresh() override;
void HandleEvent( const sf::Event& event ) override;
@@ -13,7 +13,7 @@ class SFGUI_API FileResourceLoader : public ResourceLoader {
public:
std::shared_ptr<const sf::Font> LoadFont( const std::string& path ) const override;
std::shared_ptr<const sf::Image> LoadImage( const std::string& path ) const override;
- const std::string& GetIdentifier() const;
+ const std::string& GetIdentifier() const override;
};
}
View
@@ -44,7 +44,7 @@ class SFGUI_API Fixed : public Container {
typedef std::map<Widget::Ptr, sf::Vector2f> ChildrenPositionMap;
bool HandleAdd( Widget::Ptr child ) override;
- void HandleRemove( Widget::Ptr child );
+ void HandleRemove( Widget::Ptr child ) override;
ChildrenPositionMap m_children_position_map;
};
View
@@ -42,7 +42,7 @@ class SFGUI_API Frame : public Bin, public Misc {
sf::Vector2f CalculateRequisition() override;
private:
- void HandleSizeChange();
+ void HandleSizeChange() override;
sf::String m_label;
};
View
@@ -188,13 +188,13 @@ class SFGUI_API Notebook : public Container {
typedef std::deque<ChildLabelPair> ChildrenList;
- void HandleMouseMoveEvent( int x, int y );
- void HandleMouseButtonEvent( sf::Mouse::Button button, bool press, int x, int y );
+ void HandleMouseMoveEvent( int x, int y ) override;
+ void HandleMouseButtonEvent( sf::Mouse::Button button, bool press, int x, int y ) override;
bool HandleAdd( Widget::Ptr child ) override;
- void HandleRemove( Widget::Ptr child );
- void HandleSizeChange();
- void HandleUpdate( float seconds );
- void HandleGlobalVisibilityChange();
+ void HandleRemove( Widget::Ptr child ) override;
+ void HandleSizeChange() override;
+ void HandleUpdate( float seconds ) override;
+ void HandleGlobalVisibilityChange() override;
void RecalculateSize();
@@ -136,7 +136,7 @@ class SFGUI_API ScrolledWindow : public Container {
*/
void RecalculateContentAllocation() const;
- void HandleSizeChange();
+ void HandleSizeChange() override;
bool HandleAdd( Widget::Ptr child ) override;
mutable sf::FloatRect m_content_allocation;
@@ -47,7 +47,7 @@ class SFGUI_API Spinner : public Widget {
sf::Vector2f CalculateRequisition() override;
private:
- void HandleUpdate( float seconds );
+ void HandleUpdate( float seconds ) override;
float m_elapsed_time;
@@ -85,7 +85,7 @@ class SFGUI_API Viewport : public Bin {
*/
Viewport();
- void HandleRequisitionChange();
+ void HandleRequisitionChange() override;
void UpdateView();
View
@@ -80,9 +80,9 @@ class SFGUI_API Window : public Bin {
sf::Vector2f CalculateRequisition() override;
private:
- void HandleSizeChange();
- void HandleMouseButtonEvent( sf::Mouse::Button button, bool press, int x, int y );
- void HandleMouseMoveEvent( int x, int y );
+ void HandleSizeChange() override;
+ void HandleMouseButtonEvent( sf::Mouse::Button button, bool press, int x, int y ) override;
+ void HandleMouseMoveEvent( int x, int y ) override;
bool HandleAdd( Widget::Ptr child ) override;
sf::Vector2f m_drag_offset;
View
@@ -57,7 +57,7 @@ void Box::ReorderChild( Widget::Ptr widget, std::size_t position ) {
position = std::min( position, m_box_children.size() - 1 );
ChildrenCont::iterator insertion_point( m_box_children.begin() );
- std::advance( insertion_point, position );
+ std::advance( insertion_point, static_cast<ChildrenCont::difference_type>( position ) );
m_box_children.insert( insertion_point, *iter );
m_box_children.erase( iter );
@@ -5,6 +5,8 @@
#include <SFML/Graphics/Text.hpp>
+#include <cmath>
+
namespace sfg {
namespace eng {

0 comments on commit 6f4a009

Please sign in to comment.