| 100 | } |
| 101 | |
| 102 | void Widget::GrabFocus( Ptr widget ) { |
| 103 | // Notify old focused widget. |
| 104 | if( focus_widget.lock() ) { |
| 105 | focus_widget.lock()->GetSignals().Emit( OnLostFocus ); |
| 106 | focus_widget.lock()->HandleFocusChange( widget ); |
| 107 | } |
| 108 | |
| 109 | focus_widget = widget; |
| 110 | |
| 111 | if( focus_widget.lock() ) { |
| 112 | focus_widget.lock()->GetSignals().Emit( OnGainFocus ); |
| 113 | focus_widget.lock()->HandleFocusChange( widget ); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | bool Widget::HasFocus( PtrConst widget ) { |
| 118 | if( focus_widget.lock() == widget ) { |
nothing calls this directly
no test coverage detected