Source

Mirror / include / statusBar.h

#ifndef STATUS_BAR_H
#define STATUS_BAR_H
#include <iostream>
#include <ctime>
#include <string>
#include <vector>

#include <xcb/xcb.h>
#include <cairommconfig.h>
#include <cairomm/context.h>
#include <cairomm/surface.h>

#include "window.h"
#include "event.h"

#include "cairomm/xcb_surface.h"

typedef Cairo::RefPtr<Cairo::Context> CairoContext;
typedef Cairo::RefPtr<Cairo::XcbSurface> CairoXcbSurface;

class Setup;
class Monitor;


class StatusBar
{
    public:
        StatusBar(Setup *setup, Monitor monitor);
        ~StatusBar();
        void setMode(std::string newText);
        void draw();
        void update();
        void handleExposeEvent(EventPtr event);
        void setTagNames(std::vector<std::string> newTagNames);
        void setActiveTag(std::string tagName);

    private:
        Setup *setup;
        xcb_pixmap_t pixmap;
        CairoContext context;
        CairoXcbSurface surface;
        std::string mode;
        std::string timeText;
        int width;
        std::string activeTagName;
        std::vector<std::string> tagNames;

        

};


#endif //STATUS_BAR_H