| 203 | } |
| 204 | |
| 205 | void Window::HandleMouseMoveEvent( int x, int y ) { |
| 206 | if( ( x == std::numeric_limits<int>::min() ) || ( y == std::numeric_limits<int>::min() ) ) { |
| 207 | return; |
| 208 | } |
| 209 | |
| 210 | if( m_dragging ) { |
| 211 | SetPosition( |
| 212 | sf::Vector2f( |
| 213 | static_cast<float>( x ) - m_drag_offset.x, |
| 214 | static_cast<float>( y ) - m_drag_offset.y |
| 215 | ) |
| 216 | ); |
| 217 | } |
| 218 | else if( m_resizing && (GetStyle() & RESIZE) == RESIZE ) { |
| 219 | SetAllocation( |
| 220 | sf::FloatRect( |
| 221 | GetAllocation().position, |
| 222 | { std::max( GetRequisition().x, static_cast<float>( x ) + m_drag_offset.x - GetAllocation().position.x ), |
| 223 | std::max( GetRequisition().y, static_cast<float>( y ) + m_drag_offset.y - GetAllocation().position.y ) } |
| 224 | ) |
| 225 | ); |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | bool Window::HandleAdd( Widget::Ptr child ) { |
| 230 | if( !Bin::HandleAdd( child ) ) { |
nothing calls this directly
no outgoing calls
no test coverage detected