]> git.tdb.fi Git - netvis.git/blobdiff - source/netvis.h
Get rid of the separate font texture
[netvis.git] / source / netvis.h
index daec1cfade0116cbfa08b5632e253752b81ba8e1..35d9952ac826e3aed295da08405da580c1ce20d1 100644 (file)
@@ -1,3 +1,10 @@
+/* $Id$
+
+This file is part of NetVis
+Copyright @ 2008 Mikko Rasa, Mikkosoft Productions
+Distributed unter the GPL
+*/
+
 #ifndef NETVIS_H_
 #define NETVIS_H_
 
@@ -5,6 +12,7 @@
 #include <map>
 #include <pcap.h>
 #include <msp/core/application.h>
+#include <msp/debug/profiler.h>
 #include <msp/gbase/display.h>
 #include <msp/gbase/glcontext.h>
 #include <msp/gbase/window.h>
@@ -12,8 +20,9 @@
 #include <msp/gl/font.h>
 #include <msp/time/timestamp.h>
 
-class Packet;
 class Host;
+class Packet;
+class Resolver;
 
 class NetVis: public Msp::Application
 {
@@ -21,14 +30,25 @@ private:
        std::string iface;
        pcap_t *pcap;
        std::list<Packet *> packets;
+       unsigned max_hosts;
+       unsigned max_visible_hosts;
        std::map<unsigned, Host *> hosts;
+       std::map<unsigned, Host *> disabled_hosts;
        Msp::Graphics::Display *dpy;
        Msp::Graphics::Window *wnd;
        Msp::Graphics::GLContext *glc;
-       Msp::Time::TimeStamp last_tick;
+       Msp::Time::TimeStamp tick_t;
        std::map<unsigned, Msp::GL::Color> port_colors;
        Msp::GL::Font *font;
-       Msp::GL::Texture2D *font_tex;
+       Msp::Debug::Profiler profiler;
+       bool draw_labels;
+       bool blend;
+       Resolver *resolver;
+       unsigned localnet;
+       unsigned localnet_mask;
+       Msp::Time::TimeStamp fps_t;
+       unsigned frames;
+       float fps;
 
 public:
        NetVis(int, char **);
@@ -39,9 +59,12 @@ private:
        virtual void tick();
        Host &get_host(unsigned);
        Msp::GL::Color &get_port_color(unsigned);
+       void key_press(unsigned, unsigned, wchar_t);
 
        static void capture_handler(unsigned char *, const pcap_pkthdr *, const unsigned char *);
 
+       void sighandler(int);
+
        static Application::RegApp<NetVis> reg;
 };