1
0
forked from 0ad/0ad
0ad/source/gui
wraitii 1b67a079fb Reduce duplication in JSI GUI objects implementation.
- Store the functions in an unordered_map. A no-container implementation
is doable but likely not worth the added code complexity, maybe with
C++20
- Move more things into the _impl.h
- Clear out the un-necessary friends declaration in the specific types
by moving the functions to the public interface, which makes sense.
- Fix a memory leak (JS::PersistentRootedObject weren't deleted).

This doesn't change what one needs to do to add a new type, but it does
reduce the actual code that's necessary, and makes it less error prone.

Differential Revision: https://code.wildfiregames.com/D3214
This was SVN commit r24384.
2020-12-13 15:06:18 +00:00
..
ObjectBases Reduce duplication in JSI GUI objects implementation. 2020-12-13 15:06:18 +00:00
ObjectTypes Reduce duplication in JSI GUI objects implementation. 2020-12-13 15:06:18 +00:00
Scripting Reduce duplication in JSI GUI objects implementation. 2020-12-13 15:06:18 +00:00
SettingTypes Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
tests Properly clean up _testcache folder. 2020-12-10 08:18:18 +00:00
CGUI.cpp Reduce duplication in JSI GUI objects implementation. 2020-12-13 15:06:18 +00:00
CGUI.h Reduce duplication in JSI GUI objects implementation. 2020-12-13 15:06:18 +00:00
CGUIScrollBarVertical.cpp Cleanup GUI includes, whitespace, map iterators, nullptr. 2019-09-22 23:28:25 +00:00
CGUIScrollBarVertical.h Delete GUI.h umbrella include following 8d0cb1b954. 2019-09-20 13:11:18 +00:00
CGUISetting.cpp Fix building without precompiled headers. 2020-11-18 11:35:36 +00:00
CGUISetting.h Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
CGUISprite.cpp Use CGUI& instead of CGUI* so that the 50+ users stop wondering whether or not that is null and can't even be mistaken to add redundant null checks preemptively. 2019-08-21 10:12:33 +00:00
CGUISprite.h Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
CGUIText.cpp Sort GUI Object types, GUI Object bases and GUI Setting value types into three new folders. 2019-10-02 09:44:00 +00:00
CGUIText.h Sort GUI Object types, GUI Object bases and GUI Setting value types into three new folders. 2019-10-02 09:44:00 +00:00
GUIManager.cpp [SM78 2/2] Update to Spidermonkey 78 APIs 2020-12-06 14:03:02 +00:00
GUIManager.h Fix most of the new vs2017 induced warnings. 2020-11-26 22:28:50 +00:00
GUIMatrix.cpp Move GetDefaultGuiMatrix to a separate file. 2019-08-04 03:52:00 +00:00
GUIMatrix.h Move GetDefaultGuiMatrix to a separate file. 2019-08-04 03:52:00 +00:00
GUIObjectTypes.cpp Add getTextSize() for CButton 2020-12-11 16:12:46 +00:00
GUIRenderer.cpp Uses fixed-function pipeline functions only in FFP mode. 2020-02-05 14:00:52 +00:00
GUIRenderer.h Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
GUISettingTypes.h Sort GUI Object types, GUI Object bases and GUI Setting value types into three new folders. 2019-10-02 09:44:00 +00:00
GUIStringConversions.cpp Sort GUI Object types, GUI Object bases and GUI Setting value types into three new folders. 2019-10-02 09:44:00 +00:00
GUITooltip.cpp Sort GUI Object types, GUI Object bases and GUI Setting value types into three new folders. 2019-10-02 09:44:00 +00:00
GUITooltip.h Use CGUI& instead of CGUI* so that the 50+ users stop wondering whether or not that is null and can't even be mistaken to add redundant null checks preemptively. 2019-08-21 10:12:33 +00:00
IGUIScrollBar.cpp Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
IGUIScrollBar.h Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
SGUIIcon.h Move GUIbase structs and enums to separate files. 2019-10-01 12:46:55 +00:00
SGUIMessage.h Allow right-click on disabled buttons. 2020-11-14 18:16:24 +00:00
SGUIStyle.h Move GUIbase structs and enums to separate files. 2019-10-01 12:46:55 +00:00