Difference between revisions of "Changes and Porting Tips for 1.0.0"

From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
Jump to: navigation, search
Line 16: Line 16:
 
* CEGUI::String was appended with a template for hashing so that this type can be used in c++11 sets and maps as key
 
* CEGUI::String was appended with a template for hashing so that this type can be used in c++11 sets and maps as key
 
* The CEGUI_THROW, CEGUI_TRY, CEGUI_CATCH and CEGUI_RETHROW defines have been replaced by the regular C++ keywords available for these purposes
 
* The CEGUI_THROW, CEGUI_TRY, CEGUI_CATCH and CEGUI_RETHROW defines have been replaced by the regular C++ keywords available for these purposes
 +
* Combobox: The following renames happened for consistency/clarity: setSelection -> setTextSelection, setSelectionStart -> setTextSelectionStart, setSelectionLength -> setTextSelectionLength, getSelectionStartIndex -> getSelectionStart,  getSelectionEndIndex --> getSelectionEnd, getSelectionLength --> getTextSelectionLength
 +
* Combobox Properties: "SelectionStart" -> "TextSelectionStart", "SelectionLength" -> "TextSelectionLength"
 
}}
 
}}
  
Line 25: Line 27:
 
* Scrollbar::isAtEnd() and Scrollbar::getMaxScrollPosition() are now public
 
* Scrollbar::isAtEnd() and Scrollbar::getMaxScrollPosition() are now public
 
* MultilineEditbox now has the Text Masking functionality, which previously only Editboxes featured
 
* MultilineEditbox now has the Text Masking functionality, which previously only Editboxes featured
 +
* Combobox now fires EventListSelectionAccepted events also if a user calls a method to change the selection, etc.
 
}}
 
}}
  
 
[[Category:Manuals]]
 
[[Category:Manuals]]

Revision as of 16:18, 26 July 2015

Written for CEGUI 1.0


Works with versions 1.0.x (unstable)

Introduction

Porting guide for the upcoming 1.0.0 version. The guide is for porting 0.8 to 1.0, for porting from older versions please also see the older porting guides (0.7->0.8 etc) in combination with this guide.

Major renames/API changes

  • The Editbox "MaskText" property was renamed to "TextMasked" for consistency
  • Editbox and MultilineEditbox now inherit common behaviour from the EditboxBase class.
  • The Editbox and MultilineEditbox methods getSelectionStartIndex() and getSelectionEndIndex() were renamed to getSelectionStart() and getSelectionEnd()
  • XMLAttributes::getValueAsString signature and parameters changed to: String getValueAsString(const String&, const String&) const from const String& getValueAsString(const String&, const String& ) const
  • Text Mask property renaming, done for consistency with naming conventions and associated methods. Properties renamed: "MaskText" renamed to "TextMaskingEnabled", "MaskCodepoint" renamed to "TextMaskingCodepoint"
  • Text Mask events renamed: Editbox::EventMaskedRenderingModeChanged("MaskedRenderingModeChanged") becomes EditboxBase::EventTextMaskingEnabledChanged("TextMaskingEnabledChanged"), EditboxBase::EventMaskCodePointChanged("MaskCodePointChanged") becomes EditboxBase::EventTextMaskingCodepointChanged("TextMaskingCodepointChanged")
  • Editbox::setTextMasked changed to EditboxBase::setTextMaskingEnabled, Editbox::setMaskCodePoint changed to EditboxBase::setTextMaskingCodepoint, Editbox::onMaskedRenderingModeChanged changed to EditboxBase::onTextMaskingEnabledChanged
  • All std maps and sets using StringFastLessCompare are replaced by std::unordered_map and std::unordered_set
  • CEGUI::String was appended with a template for hashing so that this type can be used in c++11 sets and maps as key
  • The CEGUI_THROW, CEGUI_TRY, CEGUI_CATCH and CEGUI_RETHROW defines have been replaced by the regular C++ keywords available for these purposes
  • Combobox: The following renames happened for consistency/clarity: setSelection -> setTextSelection, setSelectionStart -> setTextSelectionStart, setSelectionLength -> setTextSelectionLength, getSelectionStartIndex -> getSelectionStart, getSelectionEndIndex --> getSelectionEnd, getSelectionLength --> getTextSelectionLength
  • Combobox Properties: "SelectionStart" -> "TextSelectionStart", "SelectionLength" -> "TextSelectionLength"

Changes regarding the datafiles / XML

  • Multiple Fonts can now be loaded per file. The root node is now called Fonts instead of Font and contains the version attribute. Font has no version attribute anymore and multiple font nodes can be inside the Fonts node. Use ceed-migrate if you want to migrate multiple files (Search for ceed migrate in the wiki)

Minor changes

  • Scrollbar::isAtEnd() and Scrollbar::getMaxScrollPosition() are now public
  • MultilineEditbox now has the Text Masking functionality, which previously only Editboxes featured
  • Combobox now fires EventListSelectionAccepted events also if a user calls a method to change the selection, etc.