| 1803 | //----------------------------------------------------------------------------- |
| 1804 | |
| 1805 | void GuiEditCtrl::writeGuides( guideAxis axis, GuiControl* ctrl ) |
| 1806 | { |
| 1807 | // Store the guide indices of the given axis in a vector on the respective |
| 1808 | // dynamic property of the control. |
| 1809 | |
| 1810 | StringBuilder str; |
| 1811 | bool isFirst = true; |
| 1812 | for( U32 i = 0, num = mGuides[ axis ].size(); i < num; ++ i ) |
| 1813 | { |
| 1814 | if( !isFirst ) |
| 1815 | str.append( ' ' ); |
| 1816 | |
| 1817 | char buffer[ 32 ]; |
| 1818 | dSprintf( buffer, sizeof( buffer ), "%i", mGuides[ axis ][ i ] ); |
| 1819 | |
| 1820 | str.append( buffer ); |
| 1821 | |
| 1822 | isFirst = false; |
| 1823 | } |
| 1824 | |
| 1825 | String value = str.end(); |
| 1826 | ctrl->setDataField( smGuidesPropertyName[ axis ], NULL, value ); |
| 1827 | } |
| 1828 | |
| 1829 | //----------------------------------------------------------------------------- |
| 1830 |
no test coverage detected