Exemplo n.º 1
0
bool HelloWorld::on_timer_update_image()
{
    Glib::RefPtr<Gdk::Window> win = get_window();
    if (win)
    {
        Gdk::Rectangle r(0, 0, m_VW.get_width(), m_VW.get_height());
        win->invalidate_rect(r, true);
    }
	return true;
}
Exemplo n.º 2
0
bool HelloWorld::on_timer_update_image()
{
    Glib::RefPtr<Gdk::Window> win = get_window();
    if (win)
    {
    	int top_x, top_y, bottom_x, bottom_y;

    	m_VW.translate_coordinates(*this, 0, 0, top_x, top_y);
    	m_VW.translate_coordinates(*this, m_VW.get_width(), m_VW.get_height(), bottom_x, bottom_y);
        Gdk::Rectangle r(top_x, top_y, bottom_x, bottom_y);
        win->invalidate_rect(r, true);
    }
	return true;
}
Exemplo n.º 3
0
void HelloWorld::on_button_clicked()
{
	cout << "on_button_click" << endl;
	cout << m_VW.get_width() << " " << m_VW.get_height() << endl;
}