summaryrefslogtreecommitdiffstats
path: root/grapher/grapher.cxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-07-28 12:27:23 +0200
committerTim Moore <timoore@redhat.com>2009-09-16 20:09:32 +0200
commit14eb23b75be2e9ebc2cdda842e6e787b3e50efd5 (patch)
treec69b55e9a7c82006c433a2129c8b84943dc0c233 /grapher/grapher.cxx
parent0f4a9cb5967714ace01e0941592040b8c1d83ee7 (diff)
downloadsystemtap-steved-14eb23b75be2e9ebc2cdda842e6e787b3e50efd5.tar.gz
systemtap-steved-14eb23b75be2e9ebc2cdda842e6e787b3e50efd5.tar.xz
systemtap-steved-14eb23b75be2e9ebc2cdda842e6e787b3e50efd5.zip
Draw graphs inside a scrolled window
* grapher/grapher.cxx (GrapherWindow, GrapherWindow constructor): Add ScrolledWindow object and display it. Make GraphWidget its child.
Diffstat (limited to 'grapher/grapher.cxx')
-rw-r--r--grapher/grapher.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/grapher/grapher.cxx b/grapher/grapher.cxx
index a0d35017..95ac232d 100644
--- a/grapher/grapher.cxx
+++ b/grapher/grapher.cxx
@@ -13,6 +13,7 @@
#include <gtkmm/stock.h>
#include <gtkmm/main.h>
#include <gtkmm/window.h>
+#include <gtkmm/scrolledwindow.h>
#include <unistd.h>
#include <poll.h>
#include <signal.h>
@@ -27,6 +28,7 @@ public:
GrapherWindow();
virtual ~GrapherWindow() {}
Gtk::VBox m_Box;
+ Gtk::ScrolledWindow scrolled;
GraphWidget w;
protected:
virtual void on_menu_file_quit();
@@ -70,10 +72,11 @@ GrapherWindow::GrapherWindow()
std::cerr << "building menus failed: " << ex.what();
}
Gtk::Widget* pMenubar = m_refUIManager->get_widget("/MenuBar");
+ scrolled.add(w);
if(pMenubar)
m_Box.pack_start(*pMenubar, Gtk::PACK_SHRINK);
- m_Box.pack_start(w, Gtk::PACK_EXPAND_WIDGET);
- w.show();
+ m_Box.pack_start(scrolled, Gtk::PACK_EXPAND_WIDGET);
+ scrolled.show();
show_all_children();