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

Method getPropertyString

src/eepp/ui/uiwidgettable.cpp:656–678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

654}
655
656std::string UIWidgetTable::getPropertyString( const PropertyDefinition* propertyDef,
657 const Uint32& propertyIndex ) const {
658 if ( NULL == propertyDef )
659 return "";
660
661 switch ( propertyDef->getPropertyId() ) {
662 case PropertyId::RowHeight:
663 return String::format( "%ddp", getRowHeight() );
664 case PropertyId::VScrollMode:
665 return getVerticalScrollMode() == ScrollBarMode::Auto
666 ? "auto"
667 : ( getVerticalScrollMode() == ScrollBarMode::AlwaysOn ? "on" : "off" );
668 case PropertyId::HScrollMode:
669 return getHorizontalScrollMode() == ScrollBarMode::Auto
670 ? "auto"
671 : ( getHorizontalScrollMode() == ScrollBarMode::AlwaysOn ? "on" : "off" );
672 case PropertyId::ScrollBarStyle:
673 return mVScrollBar->getScrollBarType() == UIScrollBar::NoButtons ? "no-buttons"
674 : "two-buttons";
675 default:
676 return UITouchDraggableWidget::getPropertyString( propertyDef, propertyIndex );
677 }
678}
679
680std::vector<PropertyId> UIWidgetTable::getPropertiesImplemented() const {
681 auto props = UITouchDraggableWidget::getPropertiesImplemented();

Callers

nothing calls this directly

Calls 3

formatFunction · 0.85
getPropertyIdMethod · 0.80
getScrollBarTypeMethod · 0.80

Tested by

no test coverage detected