]> git.tdb.fi Git - netvis.git/blobdiff - source/netvis.h
Get rid of the draw_labels and blend variables
[netvis.git] / source / netvis.h
index 47f5de5bd31e7b05ea80248fe1ae32f32ffa5669..eb8c0a8e9d66fab276be8e6cd93687302a11db78 100644 (file)
@@ -22,6 +22,7 @@ Distributed unter the GPL
 
 class Host;
 class Packet;
+class Port;
 class Resolver;
 
 class NetVis: public Msp::Application
@@ -41,28 +42,26 @@ private:
        std::map<unsigned, Host *> hosts;
        std::map<unsigned, Host *> disabled_hosts;
        std::list<Packet *> packets;
-       std::map<unsigned, Msp::GL::Color> port_colors;
-       bool draw_labels;
-       bool blend;
+       std::map<unsigned, Port *> ports;
 
        Msp::Time::TimeStamp tick_t;
        Msp::Time::TimeStamp fps_t;
        unsigned frames;
        float fps;
 
-       Msp::Debug::Profiler profiler;
-
 public:
        NetVis(int, char **);
        ~NetVis();
 
        const Msp::GL::Font &get_font() const { return *font; }
        const std::map<unsigned, Host *> &get_hosts() const { return hosts; }
+       const std::map<unsigned, Port *> &get_ports() const { return ports; }
 private:
        virtual void tick();
+       void render();
        Host &get_host(unsigned);
-       Msp::GL::Color &get_port_color(unsigned);
-       void key_press(unsigned, unsigned, wchar_t);
+       Msp::GL::Color generate_color(bool) const;
+       const Port &get_port(unsigned);
 
        static void capture_handler(unsigned char *, const pcap_pkthdr *, const unsigned char *);