13
0
livetrax/libs/gtkmm2/tests/child_widget_managed/main.cc
Paul Davis 449aab3c46 rollback to 3428, before the mysterious removal of libs/* at 3431/3432
git-svn-id: svn://localhost/ardour2/branches/3.0@3435 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02 21:41:35 +00:00

53 lines
741 B
C++

#include <gtkmm.h>
class MyButton : public Gtk::Button
{
public:
MyButton();
virtual ~MyButton();
};
MyButton::MyButton()
: Gtk::Button("Ok", true)
{ }
MyButton::~MyButton()
{
g_warning("MyButtom::~MyButton()");
}
class ExampleWindow : public Gtk::Window
{
public:
ExampleWindow();
virtual ~ExampleWindow();
protected:
MyButton* m_button;
};
ExampleWindow::ExampleWindow()
{
set_default_size(150, 150);
m_button = manage(new MyButton);
add(*m_button);
show_all_children();
}
ExampleWindow::~ExampleWindow()
{
g_warning("ExampleWindow::~ExampleWindow()");
}
int main(int argc, char* argv[])
{
Gtk::Main kit(argc, argv);
ExampleWindow window;
kit.run(window);
return 0;
}