1
0
forked from 0ad/0ad
0ad/source/gui
elexis 3d07327837 Introduce a JSInterface_IGUITextOwner to encapsulate JSI_IGUIObject::getTextSize from 9c5062147a / D844.
JSI_IGUIObject should not contain functions that work only for some GUI
Object types, refs #5442.

Deduplicate the shuffled copy of CText::SetupText.

Avoid the 80 times slower dynamic_cast mandated by the virtual class
inheritance by adding an ugly overridable pointer to the base class
pointing at this derived classes, as bargained with Vladislav and
proposed by wraitii in D1781 id=8426.
This may be improved by refactoring the IGUIObject and JSInterface
classes to use templates and / or eliminating its virtual inheritance.

Implement and use FromJSVal / ToJSVal CSize specialization.
Remove the JS::CallArgsFromVp call.

Differential Revision: https://code.wildfiregames.com/D2136
Comments By: wraitii, Vladislav
This was SVN commit r22596.
2019-08-02 16:55:15 +00:00
..
scripting Introduce a JSInterface_IGUITextOwner to encapsulate JSI_IGUIObject::getTextSize from 9c5062147a / D844. 2019-08-02 16:55:15 +00:00
tests Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/. 2016-11-23 11:18:37 +00:00
CButton.cpp Add virtual base initialization missing in 2c47fbd66a. 2019-08-01 23:55:10 +00:00
CButton.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CChart.cpp Add virtual base initialization missing in 2c47fbd66a. 2019-08-01 23:55:10 +00:00
CChart.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CCheckBox.cpp Add virtual base initialization missing in 2c47fbd66a. 2019-08-01 23:55:10 +00:00
CCheckBox.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CDropDown.cpp Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CDropDown.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CGUI.cpp Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CGUI.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CGUIColor.h Introduce CGUIColor type inheriting Color type and switch the GUI to exclusively use that. 2019-07-26 18:57:28 +00:00
CGUIList.h Add GPL header 2009-04-18 17:00:33 +00:00
CGUIScrollBarVertical.cpp Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CGUIScrollBarVertical.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CGUISeries.h Fix [19027] by using generic code for conversions and fixing a few other issues. Refs #3403. Reviewed by leper. 2017-01-06 11:14:03 +00:00
CGUISprite.cpp CGUISpriteInstance non-copyable and FromJSVal / ToJSVal. 2019-07-28 22:40:58 +00:00
CGUISprite.h CGUISpriteInstance non-copyable and FromJSVal / ToJSVal. 2019-07-28 22:40:58 +00:00
CImage.cpp Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CImage.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CInput.cpp Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CInput.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CList.cpp Add virtual base initialization missing in 2c47fbd66a. 2019-08-01 23:55:10 +00:00
CList.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
COList.cpp Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
COList.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CProgressBar.cpp Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CProgressBar.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CRadioButton.cpp Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CRadioButton.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CSlider.cpp Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CSlider.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CText.cpp Add virtual base initialization missing in 2c47fbd66a. 2019-08-01 23:55:10 +00:00
CText.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
CTooltip.cpp Add virtual base initialization missing in 2c47fbd66a. 2019-08-01 23:55:10 +00:00
CTooltip.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
GUI.h Add C++ GUI code for drawing charts. Patch by vladislavbelov. JS will come later. Refs #3403 2016-12-07 19:03:54 +00:00
GUIbase.cpp Move CClientArea ToJSVal / FromJSVal conversion from JSI_IGUIObject (since that should be agnostic of the conversion) to CClientArea (since that defines the properties). 2019-07-26 14:47:27 +00:00
GUIbase.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
GUIManager.cpp Move CGUIManager::LoadPage to CGUIManager::SGUIPage::LoadPage, because it only operates only on that struct. 2019-08-01 20:48:05 +00:00
GUIManager.h Move CGUIManager::LoadPage to CGUIManager::SGUIPage::LoadPage, because it only operates only on that struct. 2019-08-01 20:48:05 +00:00
GUIRenderer.cpp Introduce CGUIColor type inheriting Color type and switch the GUI to exclusively use that. 2019-07-26 18:57:28 +00:00
GUIRenderer.h Introduce CGUIColor type inheriting Color type and switch the GUI to exclusively use that. 2019-07-26 18:57:28 +00:00
GUItext.cpp CGUISpriteInstance non-copyable and FromJSVal / ToJSVal. 2019-07-28 22:40:58 +00:00
GUItext.h Introduce CGUIColor type inheriting Color type and switch the GUI to exclusively use that. 2019-07-26 18:57:28 +00:00
GUITooltip.cpp Tooltip GUI engine cleanup. 2016-06-15 15:40:05 +00:00
GUITooltip.h GUI code cleanup. Fixes #3354. 2015-08-21 17:08:41 +00:00
GUItypes.h Introduce CGUIColor type inheriting Color type and switch the GUI to exclusively use that. 2019-07-26 18:57:28 +00:00
GUIutil.cpp CGUISpriteInstance non-copyable and FromJSVal / ToJSVal. 2019-07-28 22:40:58 +00:00
GUIutil.h CGUISpriteInstance non-copyable and FromJSVal / ToJSVal. 2019-07-28 22:40:58 +00:00
IGUIButtonBehavior.cpp Add virtual base initialization missing in 2c47fbd66a. 2019-08-01 23:55:10 +00:00
IGUIButtonBehavior.h Add virtual base initialization missing in 2c47fbd66a. 2019-08-01 23:55:10 +00:00
IGUIObject.cpp Add virtual CreateJSObject to IGUIObject, split from GetJSObject, so that inheriting classes can extend the JS object upon construction, refs #5442, D2136. 2019-08-02 12:18:30 +00:00
IGUIObject.h Introduce a JSInterface_IGUITextOwner to encapsulate JSI_IGUIObject::getTextSize from 9c5062147a / D844. 2019-08-02 16:55:15 +00:00
IGUIScrollBar.cpp Add virtual base initialization missing in 2c47fbd66a. 2019-08-01 23:55:10 +00:00
IGUIScrollBar.h Add virtual base initialization missing in 2c47fbd66a. 2019-08-01 23:55:10 +00:00
IGUIScrollBarOwner.cpp Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
IGUIScrollBarOwner.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
IGUITextOwner.cpp Introduce a JSInterface_IGUITextOwner to encapsulate JSI_IGUIObject::getTextSize from 9c5062147a / D844. 2019-08-02 16:55:15 +00:00
IGUITextOwner.h Introduce a JSInterface_IGUITextOwner to encapsulate JSI_IGUIObject::getTextSize from 9c5062147a / D844. 2019-08-02 16:55:15 +00:00
MiniMap.cpp Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00
MiniMap.h Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases. 2019-08-01 20:20:24 +00:00