| 1008 | } |
| 1009 | |
| 1010 | std::string UIListBox::getPropertyString( const PropertyDefinition* propertyDef, |
| 1011 | const Uint32& propertyIndex ) const { |
| 1012 | if ( NULL == propertyDef ) |
| 1013 | return ""; |
| 1014 | |
| 1015 | switch ( propertyDef->getPropertyId() ) { |
| 1016 | case PropertyId::RowHeight: |
| 1017 | return String::format( "%ddp", getRowHeight() ); |
| 1018 | case PropertyId::VScrollMode: |
| 1019 | return getVerticalScrollMode() == ScrollBarMode::Auto |
| 1020 | ? "auto" |
| 1021 | : ( getVerticalScrollMode() == ScrollBarMode::AlwaysOn ? "on" : "off" ); |
| 1022 | case PropertyId::HScrollMode: |
| 1023 | return getHorizontalScrollMode() == ScrollBarMode::Auto |
| 1024 | ? "auto" |
| 1025 | : ( getHorizontalScrollMode() == ScrollBarMode::AlwaysOn ? "on" : "off" ); |
| 1026 | case PropertyId::SelectedIndex: |
| 1027 | return String::toString( getItemSelectedIndex() ); |
| 1028 | case PropertyId::SelectedText: |
| 1029 | return getItemSelectedText(); |
| 1030 | case PropertyId::ScrollBarStyle: |
| 1031 | return mVScrollBar->getScrollBarType() == UIScrollBar::NoButtons ? "no-buttons" |
| 1032 | : "two-buttons"; |
| 1033 | default: |
| 1034 | return UITouchDraggableWidget::getPropertyString( propertyDef, propertyIndex ); |
| 1035 | } |
| 1036 | } |
| 1037 | |
| 1038 | std::vector<PropertyId> UIListBox::getPropertiesImplemented() const { |
| 1039 | auto props = UITouchDraggableWidget::getPropertiesImplemented(); |
nothing calls this directly
no test coverage detected