diff --git a/source/gui/CButton.h b/source/gui/CButton.h index 3f7be17596..9354bc84ca 100644 --- a/source/gui/CButton.h +++ b/source/gui/CButton.h @@ -18,14 +18,10 @@ #ifndef INCLUDED_CBUTTON #define INCLUDED_CBUTTON -#include "GUI.h" +#include "gui/IGUIButtonBehavior.h" +#include "gui/IGUIObject.h" +#include "gui/IGUITextOwner.h" -/** - * Button - * - * @see IGUIObject - * @see IGUIButtonBehavior - */ class CButton : public IGUIButtonBehavior, public IGUITextOwner { GUI_OBJECT(CButton) diff --git a/source/gui/CChart.cpp b/source/gui/CChart.cpp index bdfa0e0655..29b9233092 100644 --- a/source/gui/CChart.cpp +++ b/source/gui/CChart.cpp @@ -20,6 +20,8 @@ #include "CChart.h" #include "gui/CGUIColor.h" +#include "gui/CGUIList.h" +#include "gui/CGUISeries.h" #include "gui/CGUIString.h" #include "gui/GUIMatrix.h" #include "graphics/ShaderManager.h" diff --git a/source/gui/CChart.h b/source/gui/CChart.h index de0c0fc3f1..5d3114dd14 100644 --- a/source/gui/CChart.h +++ b/source/gui/CChart.h @@ -18,13 +18,11 @@ #ifndef INCLUDED_CCHART #define INCLUDED_CCHART -#include "gui/GUI.h" #include "gui/IGUITextOwner.h" #include "maths/Vector2D.h" #include - struct CChartData { // Avoid copying the container. @@ -38,8 +36,6 @@ struct CChartData /** * Chart for a data visualization as lines or points - * - * @see IGUIObject */ class CChart : public IGUITextOwner { diff --git a/source/gui/CCheckBox.h b/source/gui/CCheckBox.h index a4c2062265..c1fd763148 100644 --- a/source/gui/CCheckBox.h +++ b/source/gui/CCheckBox.h @@ -18,15 +18,10 @@ #ifndef INCLUDED_CCHECKBOX #define INCLUDED_CCHECKBOX -#include "GUI.h" +#include "gui/IGUIButtonBehavior.h" +#include "gui/IGUIObject.h" +#include "gui/IGUITextOwner.h" -/** - * CheckBox - * - * @see IGUIObject - * @see IGUISettingsObject - * @see IGUIButtonBehavior - */ class CCheckBox : public IGUIButtonBehavior, public IGUITextOwner { GUI_OBJECT(CCheckBox) diff --git a/source/gui/CDropDown.h b/source/gui/CDropDown.h index 99d82b5666..007e70b469 100644 --- a/source/gui/CDropDown.h +++ b/source/gui/CDropDown.h @@ -23,18 +23,16 @@ GUI Object - Drop Down (list) Works just like a list-box, but it hides all the elements that aren't selected. They can be brought up by pressing the control. - ---More info-- - - Check GUI.h - */ #ifndef INCLUDED_CDROPDOWN #define INCLUDED_CDROPDOWN -#include "GUI.h" -#include "CList.h" +#include "gui/CGUIList.h" +#include "gui/CList.h" +#include "gui/IGUIScrollBar.h" + +#include /** * Drop Down diff --git a/source/gui/CGUI.h b/source/gui/CGUI.h index 0f29f31f52..9000543f8d 100644 --- a/source/gui/CGUI.h +++ b/source/gui/CGUI.h @@ -32,6 +32,8 @@ #include "scriptinterface/ScriptInterface.h" #include +#include +#include ERROR_TYPE(GUI, JSOpenFailed); diff --git a/source/gui/CGUIList.h b/source/gui/CGUIList.h index 1f319a44d7..676c80324a 100644 --- a/source/gui/CGUIList.h +++ b/source/gui/CGUIList.h @@ -20,6 +20,8 @@ #include "gui/CGUIString.h" +#include + class CGUIList { public: // struct:ish (but for consistency I call it _C_GUIList, and diff --git a/source/gui/CGUIScrollBarVertical.cpp b/source/gui/CGUIScrollBarVertical.cpp index 2d3a8ef6c1..385efa22c8 100644 --- a/source/gui/CGUIScrollBarVertical.cpp +++ b/source/gui/CGUIScrollBarVertical.cpp @@ -19,9 +19,7 @@ #include "CGUIScrollBarVertical.h" -#include "GUI.h" -#include "CGUI.h" - +#include "gui/CGUI.h" #include "ps/CLogger.h" diff --git a/source/gui/CGUIScrollBarVertical.h b/source/gui/CGUIScrollBarVertical.h index 27ec948948..aaa545b337 100644 --- a/source/gui/CGUIScrollBarVertical.h +++ b/source/gui/CGUIScrollBarVertical.h @@ -16,29 +16,15 @@ */ /* -A GUI ScrollBar - ---Overview-- - A GUI Scrollbar, this class doesn't present all functionality to the scrollbar, it just controls the drawing and a wrapper for interaction with it. - ---Usage-- - - Used in everywhere scrollbars are needed, like in a combobox for instance. - ---More info-- - - Check GUI.h - */ #ifndef INCLUDED_CGUISCROLLBARVERTICAL #define INCLUDED_CGUISCROLLBARVERTICAL #include "IGUIScrollBar.h" -#include "GUI.h" /** * Vertical implementation of IGUIScrollBar diff --git a/source/gui/CGUISeries.h b/source/gui/CGUISeries.h index 05ce6243ae..259b607bfb 100644 --- a/source/gui/CGUISeries.h +++ b/source/gui/CGUISeries.h @@ -21,6 +21,8 @@ #include "maths/Vector2D.h" +#include + class CGUISeries { public: diff --git a/source/gui/CGUISetting.cpp b/source/gui/CGUISetting.cpp index ebafe75027..ccb5d065ab 100644 --- a/source/gui/CGUISetting.cpp +++ b/source/gui/CGUISetting.cpp @@ -20,7 +20,6 @@ #include "CGUISetting.h" #include "gui/CGUI.h" -#include "gui/GUI.h" template CGUISetting::CGUISetting(IGUIObject& pObject, const CStr& Name) diff --git a/source/gui/CGUISprite.h b/source/gui/CGUISprite.h index d754ee0b87..4aa92b7bd3 100644 --- a/source/gui/CGUISprite.h +++ b/source/gui/CGUISprite.h @@ -28,7 +28,9 @@ #include "gui/GUIRenderer.h" #include "lib/res/graphics/ogl_tex.h" +#include #include +#include struct SGUIImageEffects { diff --git a/source/gui/CGUIString.cpp b/source/gui/CGUIString.cpp index 04941a6dfc..0cdc65b6b2 100644 --- a/source/gui/CGUIString.cpp +++ b/source/gui/CGUIString.cpp @@ -21,7 +21,6 @@ #include "graphics/FontMetrics.h" #include "gui/CGUI.h" -#include "gui/GUI.h" #include "lib/utf8.h" #include "ps/CLogger.h" diff --git a/source/gui/CImage.cpp b/source/gui/CImage.cpp index 5c0adfe752..dff3aae181 100644 --- a/source/gui/CImage.cpp +++ b/source/gui/CImage.cpp @@ -20,7 +20,6 @@ #include "CImage.h" #include "gui/CGUI.h" -#include "gui/GUI.h" #include "lib/ogl.h" CImage::CImage(CGUI& pGUI) diff --git a/source/gui/CImage.h b/source/gui/CImage.h index 58def04fc4..2b47a5f742 100644 --- a/source/gui/CImage.h +++ b/source/gui/CImage.h @@ -18,7 +18,7 @@ #ifndef INCLUDED_CIMAGE #define INCLUDED_CIMAGE -#include "GUI.h" +#include "gui/IGUIObject.h" /** * Object just for drawing a sprite. Like CText, without the @@ -29,8 +29,6 @@ * without functionality used, and that is a lot of unnecessary * overhead. That's why I thought I'd go with an intuitive * control. - * - * @see IGUIObject */ class CImage : public IGUIObject { diff --git a/source/gui/CInput.cpp b/source/gui/CInput.cpp index 8e16ea583e..9a69f1fd3e 100644 --- a/source/gui/CInput.cpp +++ b/source/gui/CInput.cpp @@ -21,7 +21,6 @@ #include "gui/CGUI.h" #include "gui/CGUIScrollBarVertical.h" -#include "gui/GUI.h" #include "graphics/FontMetrics.h" #include "graphics/ShaderManager.h" #include "graphics/TextRenderer.h" diff --git a/source/gui/CInput.h b/source/gui/CInput.h index 3639839980..ea302b3686 100644 --- a/source/gui/CInput.h +++ b/source/gui/CInput.h @@ -18,17 +18,17 @@ #ifndef INCLUDED_CINPUT #define INCLUDED_CINPUT -#include "GUI.h" +#include "gui/IGUIScrollBarOwner.h" #include "lib/external_libraries/libsdl.h" +#include + /** * Text field where you can input and edit the text. * * It doesn't use IGUITextOwner, because we don't need * any other features than word-wrapping, and we need to be * able to rapidly change the string. - * - * @see IGUIObject */ class CInput : public IGUIScrollBarOwner { diff --git a/source/gui/CList.cpp b/source/gui/CList.cpp index 32af716a55..d5b0052399 100644 --- a/source/gui/CList.cpp +++ b/source/gui/CList.cpp @@ -21,6 +21,7 @@ #include "gui/CGUI.h" #include "gui/CGUIColor.h" +#include "gui/CGUIList.h" #include "gui/CGUIScrollBarVertical.h" #include "lib/external_libraries/libsdl.h" #include "lib/timer.h" diff --git a/source/gui/CList.h b/source/gui/CList.h index 10b005be8b..a3d3f7283d 100644 --- a/source/gui/CList.h +++ b/source/gui/CList.h @@ -18,7 +18,10 @@ #ifndef INCLUDED_CLIST #define INCLUDED_CLIST -#include "IGUIScrollBar.h" +#include "gui/IGUIScrollBarOwner.h" +#include "gui/IGUITextOwner.h" + +#include /** * Create a list of elements, where one can be selected diff --git a/source/gui/COList.cpp b/source/gui/COList.cpp index 5397b41f23..9b617ed109 100644 --- a/source/gui/COList.cpp +++ b/source/gui/COList.cpp @@ -21,6 +21,8 @@ #include "gui/CGUI.h" #include "gui/CGUIColor.h" +#include "gui/CGUIList.h" +#include "gui/IGUIScrollBar.h" #include "i18n/L10n.h" #include "ps/CLogger.h" diff --git a/source/gui/COList.h b/source/gui/COList.h index ca5acccfb6..0179b1333a 100644 --- a/source/gui/COList.h +++ b/source/gui/COList.h @@ -17,9 +17,10 @@ #ifndef INCLUDED_COLIST #define INCLUDED_COLIST -#include "GUI.h" #include "CList.h" +#include + /** * Represents a column. */ diff --git a/source/gui/CProgressBar.cpp b/source/gui/CProgressBar.cpp index 3abc90adda..e0ff7e0e80 100644 --- a/source/gui/CProgressBar.cpp +++ b/source/gui/CProgressBar.cpp @@ -20,7 +20,6 @@ #include "CProgressBar.h" #include "gui/CGUI.h" -#include "gui/GUI.h" #include "lib/ogl.h" CProgressBar::CProgressBar(CGUI& pGUI) diff --git a/source/gui/CProgressBar.h b/source/gui/CProgressBar.h index 98621a2b78..490d879a81 100644 --- a/source/gui/CProgressBar.h +++ b/source/gui/CProgressBar.h @@ -18,12 +18,10 @@ #ifndef INCLUDED_CPROGRESSBAR #define INCLUDED_CPROGRESSBAR -#include "GUI.h" +#include "gui/IGUIObject.h" /** * Object used to draw a value (e.g. progress) from 0 to 100 visually. - * - * @see IGUIObject */ class CProgressBar : public IGUIObject { diff --git a/source/gui/CRadioButton.cpp b/source/gui/CRadioButton.cpp index 5c8d3fa9a3..1c8fa4b4ab 100644 --- a/source/gui/CRadioButton.cpp +++ b/source/gui/CRadioButton.cpp @@ -19,8 +19,6 @@ #include "CRadioButton.h" -#include "GUI.h" - CRadioButton::CRadioButton(CGUI& pGUI) : CCheckBox(pGUI), IGUIObject(pGUI) { diff --git a/source/gui/CRadioButton.h b/source/gui/CRadioButton.h index dc8f1e851c..cffc412b4c 100644 --- a/source/gui/CRadioButton.h +++ b/source/gui/CRadioButton.h @@ -18,7 +18,6 @@ #ifndef INCLUDED_CRADIOBUTTON #define INCLUDED_CRADIOBUTTON -#include "GUI.h" #include "CCheckBox.h" /** diff --git a/source/gui/CSlider.cpp b/source/gui/CSlider.cpp index 4b4a718330..6a70ede4b7 100644 --- a/source/gui/CSlider.cpp +++ b/source/gui/CSlider.cpp @@ -20,7 +20,6 @@ #include "CSlider.h" #include "gui/CGUI.h" -#include "gui/GUI.h" #include "lib/ogl.h" CSlider::CSlider(CGUI& pGUI) diff --git a/source/gui/CSlider.h b/source/gui/CSlider.h index 53179fdbc9..be9e63114e 100644 --- a/source/gui/CSlider.h +++ b/source/gui/CSlider.h @@ -18,8 +18,7 @@ #ifndef INCLUDED_CSLIDER #define INCLUDED_CSLIDER -#include "GUI.h" - +#include "gui/IGUIObject.h" class CSlider : public IGUIObject { diff --git a/source/gui/CText.cpp b/source/gui/CText.cpp index bff95cf8f4..6e60d60822 100644 --- a/source/gui/CText.cpp +++ b/source/gui/CText.cpp @@ -21,7 +21,6 @@ #include "gui/CGUI.h" #include "gui/CGUIScrollBarVertical.h" -#include "gui/GUI.h" #include "lib/ogl.h" CText::CText(CGUI& pGUI) diff --git a/source/gui/CText.h b/source/gui/CText.h index e838d5fd58..d3330602de 100644 --- a/source/gui/CText.h +++ b/source/gui/CText.h @@ -18,12 +18,11 @@ #ifndef INCLUDED_CTEXT #define INCLUDED_CTEXT -#include "GUI.h" +#include "gui/IGUIScrollBarOwner.h" +#include "gui/IGUITextOwner.h" /** * Text field that just displays static text. - * - * @see IGUIObject */ class CText : public IGUIScrollBarOwner, public IGUITextOwner { diff --git a/source/gui/CTooltip.cpp b/source/gui/CTooltip.cpp index d1dbc00733..e8238ca15f 100644 --- a/source/gui/CTooltip.cpp +++ b/source/gui/CTooltip.cpp @@ -18,7 +18,8 @@ #include "precompiled.h" #include "CTooltip.h" -#include "CGUI.h" + +#include "gui/CGUI.h" #include diff --git a/source/gui/GUI.h b/source/gui/GUI.h deleted file mode 100644 index b96d34e948..0000000000 --- a/source/gui/GUI.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2019 Wildfire Games. - * This file is part of 0 A.D. - * - * 0 A.D. is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * 0 A.D. is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with 0 A.D. If not, see . - */ - -#ifndef INCLUDED_GUI -#define INCLUDED_GUI - -#include -#include -#include -#include - -#include "ps/CStr.h" - -#include "CGUIList.h" -#include "CGUISeries.h" -#include "CGUIText.h" -#include "GUIbase.h" -#include "IGUIButtonBehavior.h" -#include "IGUIObject.h" -#include "IGUIScrollBarOwner.h" // Required by IGUIScrollBar -#include "IGUIScrollBar.h" -#include "IGUITextOwner.h" - -#endif // INCLUDED_GUI diff --git a/source/gui/GUIManager.h b/source/gui/GUIManager.h index 9dacb601bf..2c37e2d280 100644 --- a/source/gui/GUIManager.h +++ b/source/gui/GUIManager.h @@ -28,6 +28,8 @@ #include "scriptinterface/ScriptVal.h" #include "scriptinterface/ScriptInterface.h" +#include + class CGUI; class JSObject; class IGUIObject; @@ -175,7 +177,7 @@ private: shared_ptr m_ScriptRuntime; shared_ptr m_ScriptInterface; - typedef std::vector PageStackType; + using PageStackType = std::vector; PageStackType m_PageStack; CTemplateLoader m_TemplateLoader; diff --git a/source/gui/GUIRenderer.h b/source/gui/GUIRenderer.h index 9c90ae1da1..93bffc7673 100644 --- a/source/gui/GUIRenderer.h +++ b/source/gui/GUIRenderer.h @@ -25,6 +25,7 @@ #include "ps/CStr.h" #include "ps/Shapes.h" +#include #include class CGUISprite; diff --git a/source/gui/GUITooltip.cpp b/source/gui/GUITooltip.cpp index 5b4849ac67..b14f92178a 100644 --- a/source/gui/GUITooltip.cpp +++ b/source/gui/GUITooltip.cpp @@ -19,9 +19,8 @@ #include "GUITooltip.h" -#include "CGUI.h" -#include "IGUIObject.h" - +#include "gui/CGUI.h" +#include "gui/IGUIObject.h" #include "lib/timer.h" #include "ps/CLogger.h" diff --git a/source/gui/GUIbase.cpp b/source/gui/GUIbase.cpp index e358f63983..2f32631ef7 100644 --- a/source/gui/GUIbase.cpp +++ b/source/gui/GUIbase.cpp @@ -17,9 +17,9 @@ #include "precompiled.h" -#include "GUI.h" -#include "gui/scripting/JSInterface_GUITypes.h" +#include "GUIbase.h" +#include "gui/scripting/JSInterface_GUITypes.h" #include "ps/CLogger.h" CClientArea::CClientArea() : pixel(0.f,0.f,0.f,0.f), percent(0.f,0.f,0.f,0.f) diff --git a/source/gui/GUIbase.h b/source/gui/GUIbase.h index 3d84431872..dcaad9ac9c 100644 --- a/source/gui/GUIbase.h +++ b/source/gui/GUIbase.h @@ -18,35 +18,24 @@ /* GUI Core, stuff that the whole GUI uses ---Overview-- - Contains defines, includes, types etc that the whole GUI should have included. - ---More info-- - - Check GUI.h - */ #ifndef INCLUDED_GUIBASE #define INCLUDED_GUIBASE -#include -#include - #include "gui/CGUIColor.h" #include "ps/CStr.h" #include "ps/Errors.h" -// I would like to just forward declare CSize, but it doesn't -// seem to be defined anywhere in the predefined header. #include "ps/Shapes.h" #include "scriptinterface/ScriptInterface.h" +#include +#include + class IGUIObject; -// Object settings setups -// Setup an object's ConstructObject function #define GUI_OBJECT(obj) \ public: \ static IGUIObject* ConstructObject(CGUI& pGUI) \ @@ -130,8 +119,8 @@ enum EAlign { EAlign_Left, EAlign_Right, EAlign_Center }; enum EVAlign { EVAlign_Top, EVAlign_Bottom, EVAlign_Center }; // Typedefs -typedef std::map map_pObjects; -typedef std::vector vector_pObjects; +using map_pObjects = std::map; +using vector_pObjects = std::vector; // Icon, you create them in the XML file with root element // you use them in text owned by different objects... Such as CText. diff --git a/source/gui/GUItypes.h b/source/gui/GUItypes.h index 6c90f3af1e..4ce524b038 100644 --- a/source/gui/GUItypes.h +++ b/source/gui/GUItypes.h @@ -25,6 +25,9 @@ places, and to make it much easier to add a new type). Just do to handle every possible type. */ +#include "gui/CGUIList.h" +#include "gui/CGUISeries.h" + #ifndef GUITYPE_IGNORE_COPYABLE TYPE(bool) TYPE(i32) diff --git a/source/gui/IGUIButtonBehavior.cpp b/source/gui/IGUIButtonBehavior.cpp index cb75ff1877..d678f8b308 100644 --- a/source/gui/IGUIButtonBehavior.cpp +++ b/source/gui/IGUIButtonBehavior.cpp @@ -17,9 +17,9 @@ #include "precompiled.h" -#include "GUI.h" - #include "gui/CGUI.h" +#include "gui/CGUISprite.h" +#include "gui/IGUIButtonBehavior.h" IGUIButtonBehavior::IGUIButtonBehavior(CGUI& pGUI) : IGUIObject(pGUI), m_Pressed(false) diff --git a/source/gui/IGUIButtonBehavior.h b/source/gui/IGUIButtonBehavior.h index 8db3816c34..d3bf269dcc 100644 --- a/source/gui/IGUIButtonBehavior.h +++ b/source/gui/IGUIButtonBehavior.h @@ -16,26 +16,16 @@ */ /* -GUI Object Base - Button Behavior - ---Overview-- - Interface class that enhance the IGUIObject with buttony behavior (click and release to click a button), and the GUI message GUIM_PRESSED. When creating a class with extended settings and buttony behavior, just do a multiple inheritance. - ---More info-- - - Check GUI.h - */ #ifndef INCLUDED_IGUIBUTTONBEHAVIOR #define INCLUDED_IGUIBUTTONBEHAVIOR -#include "gui/GUI.h" #include "gui/IGUIObject.h" class CGUISpriteInstance; @@ -44,8 +34,6 @@ class CGUISpriteInstance; * Appends button behaviours to the IGUIObject. * Can be used with multiple inheritance alongside * IGUISettingsObject and such. - * - * @see IGUIObject */ class IGUIButtonBehavior : virtual public IGUIObject { diff --git a/source/gui/IGUIObject.cpp b/source/gui/IGUIObject.cpp index 6490924335..e232298802 100644 --- a/source/gui/IGUIObject.cpp +++ b/source/gui/IGUIObject.cpp @@ -17,8 +17,6 @@ #include "precompiled.h" -#include "GUI.h" - #include "gui/CGUI.h" #include "gui/CGUISetting.h" #include "gui/scripting/JSInterface_GUITypes.h" diff --git a/source/gui/IGUIObject.h b/source/gui/IGUIObject.h index f3b535b9e0..d11ba3464c 100644 --- a/source/gui/IGUIObject.h +++ b/source/gui/IGUIObject.h @@ -30,6 +30,7 @@ #include "lib/input.h" // just for IN_PASS #include "ps/XML/Xeromyces.h" +#include #include #include diff --git a/source/gui/IGUIScrollBar.cpp b/source/gui/IGUIScrollBar.cpp index 9ea9fe5de6..d77ea75b3a 100644 --- a/source/gui/IGUIScrollBar.cpp +++ b/source/gui/IGUIScrollBar.cpp @@ -17,24 +17,25 @@ #include "precompiled.h" -#include "GUI.h" +#include "IGUIScrollBar.h" +#include "gui/IGUIScrollBarOwner.h" #include "gui/CGUI.h" #include "maths/MathUtil.h" IGUIScrollBar::IGUIScrollBar(CGUI& pGUI) - : m_pGUI(pGUI), - m_pStyle(NULL), - m_X(300.f), m_Y(300.f), - m_ScrollRange(1.f), m_ScrollSpace(0.f), // MaxPos: not 0, due to division. - m_Length(200.f), m_Width(20.f), - m_BarSize(0.f), m_Pos(0.f), - m_ButtonPlusPressed(false), - m_ButtonMinusPressed(false), - m_ButtonPlusHovered(false), - m_ButtonMinusHovered(false), - m_BarHovered(false), - m_BarPressed(false) + : m_pGUI(pGUI), + m_pStyle(nullptr), + m_X(300.f), m_Y(300.f), + m_ScrollRange(1.f), m_ScrollSpace(0.f), // MaxPos: not 0, due to division. + m_Length(200.f), m_Width(20.f), + m_BarSize(0.f), m_Pos(0.f), + m_ButtonPlusPressed(false), + m_ButtonMinusPressed(false), + m_ButtonPlusHovered(false), + m_ButtonMinusHovered(false), + m_BarHovered(false), + m_BarPressed(false) { } diff --git a/source/gui/IGUIScrollBar.h b/source/gui/IGUIScrollBar.h index ae294932e6..453bec5497 100644 --- a/source/gui/IGUIScrollBar.h +++ b/source/gui/IGUIScrollBar.h @@ -16,28 +16,17 @@ */ /* -A GUI ScrollBar - ---Overview-- - A GUI Scrollbar, this class doesn't present all functionality to the scrollbar, it just controls the drawing and a wrapper for interaction with it. - ---Usage-- - - Used in everywhere scrollbars are needed, like in a combobox for instance. - ---More info-- - - Check GUI.h - */ #ifndef INCLUDED_IGUISCROLLBAR #define INCLUDED_IGUISCROLLBAR -#include "GUI.h" +#include "gui/CGUISprite.h" + +class IGUIScrollBarOwner; /** * The GUI Scroll-bar style. Tells us how scroll-bars look and feel. @@ -386,12 +375,12 @@ protected: /** * Pointer to scroll bar style used. */ - SGUIScrollBarStyle *m_pStyle; + SGUIScrollBarStyle* m_pStyle; /** * Host object, prerequisite! */ - IGUIScrollBarOwner *m_pHostObject; + IGUIScrollBarOwner* m_pHostObject; /** * Reference to CGUI object, these cannot work stand-alone diff --git a/source/gui/IGUIScrollBarOwner.cpp b/source/gui/IGUIScrollBarOwner.cpp index 7edf6a80d6..3a9b8d7b2e 100644 --- a/source/gui/IGUIScrollBarOwner.cpp +++ b/source/gui/IGUIScrollBarOwner.cpp @@ -17,8 +17,10 @@ #include "precompiled.h" -#include "GUI.h" +#include "IGUIScrollBarOwner.h" + #include "gui/CGUI.h" +#include "gui/IGUIScrollBar.h" IGUIScrollBarOwner::IGUIScrollBarOwner(CGUI& pGUI) : IGUIObject(pGUI) diff --git a/source/gui/IGUIScrollBarOwner.h b/source/gui/IGUIScrollBarOwner.h index e210fb0755..18d47f11f9 100644 --- a/source/gui/IGUIScrollBarOwner.h +++ b/source/gui/IGUIScrollBarOwner.h @@ -18,7 +18,9 @@ #ifndef INCLUDED_IGUISCROLLBAROWNER #define INCLUDED_IGUISCROLLBAROWNER -#include "GUI.h" +#include "gui/IGUIObject.h" + +#include struct SGUIScrollBarStyle; class IGUIScrollBar; @@ -26,9 +28,6 @@ class IGUIScrollBar; /** * Base-class this if you want an object to contain * one, or several, scroll-bars. - * - * @see IGUIObject - * @see IGUIScrollBar */ class IGUIScrollBarOwner : virtual public IGUIObject { diff --git a/source/gui/IGUITextOwner.cpp b/source/gui/IGUITextOwner.cpp index 6be5d71cbf..090b66240e 100644 --- a/source/gui/IGUITextOwner.cpp +++ b/source/gui/IGUITextOwner.cpp @@ -19,7 +19,6 @@ #include "IGUITextOwner.h" -#include "gui/GUI.h" #include "gui/CGUI.h" #include "gui/scripting/JSInterface_IGUITextOwner.h" diff --git a/source/gui/IGUITextOwner.h b/source/gui/IGUITextOwner.h index c41ffec38f..3a3f15a7ce 100644 --- a/source/gui/IGUITextOwner.h +++ b/source/gui/IGUITextOwner.h @@ -25,23 +25,19 @@ GUI Object Base - Text Owner and many controls that will use CGUIStrings might not use this, but does help for regular usage such as a text-box, a button, a radio button etc. - ---More info-- - - Check GUI.h - */ #ifndef INCLUDED_IGUITEXTOWNER #define INCLUDED_IGUITEXTOWNER -#include "GUI.h" +#include "gui/CGUIText.h" +#include "gui/IGUIObject.h" #include "gui/scripting/JSInterface_IGUITextOwner.h" +#include + /** * Framework for handling Output text. - * - * @see IGUIObject */ class IGUITextOwner : virtual public IGUIObject { diff --git a/source/gui/MiniMap.cpp b/source/gui/MiniMap.cpp index 0dc81ee976..f6a9955917 100644 --- a/source/gui/MiniMap.cpp +++ b/source/gui/MiniMap.cpp @@ -29,7 +29,6 @@ #include "graphics/TerrainTextureManager.h" #include "graphics/TerritoryTexture.h" #include "gui/CGUI.h" -#include "gui/GUI.h" #include "gui/GUIManager.h" #include "gui/GUIMatrix.h" #include "lib/bits.h" diff --git a/source/gui/MiniMap.h b/source/gui/MiniMap.h index 4f2474a695..b8f6f35bbd 100644 --- a/source/gui/MiniMap.h +++ b/source/gui/MiniMap.h @@ -18,7 +18,8 @@ #ifndef INCLUDED_MINIMAP #define INCLUDED_MINIMAP -#include "gui/GUI.h" +#include "gui/IGUIObject.h" +#include "graphics/ShaderProgramPtr.h" #include "renderer/VertexArray.h" class CCamera; diff --git a/source/gui/scripting/GuiScriptConversions.cpp b/source/gui/scripting/GuiScriptConversions.cpp index 068780280c..f0ae9e59e4 100644 --- a/source/gui/scripting/GuiScriptConversions.cpp +++ b/source/gui/scripting/GuiScriptConversions.cpp @@ -27,6 +27,8 @@ #include "ps/Hotkey.h" #include "scriptinterface/ScriptConversions.h" +#include + #define SET(obj, name, value) STMT(JS::RootedValue v_(cx); AssignOrToJSVal(cx, &v_, (value)); JS_SetProperty(cx, obj, (name), v_)) // ignore JS_SetProperty return value, because errors should be impossible // and we can't do anything useful in the case of errors anyway diff --git a/source/pch/gui/precompiled.h b/source/pch/gui/precompiled.h index 07c06ca4d2..61ff4379e8 100644 --- a/source/pch/gui/precompiled.h +++ b/source/pch/gui/precompiled.h @@ -24,8 +24,9 @@ #if HAVE_PCH +#include "gui/CGUI.h" +#include "gui/IGUIObject.h" #include "ps/CStr.h" -#include "gui/GUI.h" #include "scriptinterface/ScriptInterface.h" #endif // HAVE_PCH diff --git a/source/ps/GameSetup/GameSetup.cpp b/source/ps/GameSetup/GameSetup.cpp index 418b691cce..d4e3051ce5 100644 --- a/source/ps/GameSetup/GameSetup.cpp +++ b/source/ps/GameSetup/GameSetup.cpp @@ -36,7 +36,6 @@ #include "graphics/MaterialManager.h" #include "graphics/TerrainTextureManager.h" #include "gui/CGUI.h" -#include "gui/GUI.h" #include "gui/GUIManager.h" #include "i18n/L10n.h" #include "maths/MathUtil.h" diff --git a/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp index ecfe8e67a5..c2684f6878 100644 --- a/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp @@ -25,9 +25,9 @@ #include "graphics/CinemaManager.h" #include "graphics/GameView.h" #include "gui/GUIManager.h" -#include "gui/GUI.h" #include "gui/CGUI.h" #include "lib/external_libraries/libsdl.h" +#include "lib/ogl.h" #include "lib/sysdep/cpu.h" #include "maths/MathUtil.h" #include "ps/Game.h"