MCPcopy Create free account
hub / github.com/SpartanJ/eepp / getPropertyString

Method getPropertyString

src/eepp/ui/uiscrollablewidget.cpp:243–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243std::string UIScrollableWidget::getPropertyString( const PropertyDefinition* propertyDef,
244 const Uint32& propertyIndex ) const {
245 if ( NULL == propertyDef )
246 return "";
247
248 switch ( propertyDef->getPropertyId() ) {
249 case PropertyId::VScrollMode:
250 return getVerticalScrollMode() == ScrollBarMode::Auto
251 ? "auto"
252 : ( getVerticalScrollMode() == ScrollBarMode::AlwaysOn ? "on" : "off" );
253 case PropertyId::HScrollMode:
254 return getHorizontalScrollMode() == ScrollBarMode::Auto
255 ? "auto"
256 : ( getHorizontalScrollMode() == ScrollBarMode::AlwaysOn ? "on" : "off" );
257 case PropertyId::ScrollBarStyle:
258 return mVScroll->getScrollBarType() == UIScrollBar::NoButtons ? "no-buttons"
259 : "two-buttons";
260 case PropertyId::ScrollBarMode:
261 return getViewType() == ScrollViewType::Overlay ? "overlay" : "outside";
262 default:
263 return UIWidget::getPropertyString( propertyDef, propertyIndex );
264 }
265}
266
267std::vector<PropertyId> UIScrollableWidget::getPropertiesImplemented() const {
268 auto props = UIWidget::getPropertiesImplemented();

Callers

nothing calls this directly

Calls 2

getPropertyIdMethod · 0.80
getScrollBarTypeMethod · 0.80

Tested by

no test coverage detected