MCPcopy Create free account
hub / github.com/TankOs/SFGUI / HandleAdd

Method HandleAdd

src/SFGUI/Box.cpp:69–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69bool Box::HandleAdd( Widget::Ptr child ) {
70 ChildrenCont::const_iterator iter( std::find( m_box_children.begin(), m_box_children.end(), child ) );
71
72 // If there's no ChildInfo present for the widget, the user added the widget
73 // manually, which is not allowed for this class.
74 if( iter == m_box_children.end() ) {
75
76#if defined( SFGUI_DEBUG )
77 std::cerr << "SFGUI warning: Child must be added via Pack() for sfg::Box widgets.\n";
78#endif
79
80 return false;
81 }
82
83 Container::HandleAdd( child );
84
85 RequestResize();
86 Invalidate();
87
88 return true;
89}
90
91void Box::HandleRemove( Widget::Ptr child ) {
92 ChildrenCont::iterator iter( std::find( m_box_children.begin(), m_box_children.end(), child ) );

Callers

nothing calls this directly

Calls 1

endMethod · 0.80

Tested by

no test coverage detected