00001 #include "VisualComponent.h" 00002 #include "Window.h" 00003 #include <algorithm> 00004 00005 Window::Window() 00006 { 00007 } 00008 00009 void Window::SetContents( VisualComponent* contents_ ) 00010 { 00011 m_contents.push_back( contents_ ); 00012 } 00013 00014 void Window::Draw() const 00015 { 00016 std::cout << "Window-draw: "; 00017 std::for_each( 00018 m_contents.begin(), 00019 m_contents.end(), 00020 std::mem_fun( &VisualComponent::Draw ) 00021 ); 00022 std::cout << "\n\n"; 00023 } 00024 00025 void Window::Resize() 00026 { 00027 std::cout << "Window-resize: "; 00028 std::for_each( 00029 m_contents.begin(), 00030 m_contents.end(), 00031 std::mem_fun( &VisualComponent::Resize ) 00032 ); 00033 std::cout << "\n\n"; 00034 }