src/statusbar.h

Go to the documentation of this file.
00001 // Copyright (c) 2003 - 2004 Anselm R. Garbe <anselmg at t-online.de>
00002 // See ../LICENSE.txt for license details.
00003 //
00004 // $Id: statusbar.h 7 2007-05-24 11:03:53Z eg1981 $
00005 
00006 #ifndef __STATUSBAR_H
00007 #define __STATUSBAR_H
00008 
00009 #include "bar.h"
00010 
00011 #include <set>
00012 #include <string>
00013 #include "ncwm.h"
00014 
00015 class Kernel;
00016 class Monitor;
00017 
00021 class StatusBar : public Bar  {
00022 
00023 public:
00024 
00025     StatusBar(Monitor *monitor, Rectangle *rect);
00026 
00027     ~StatusBar();
00028 
00029     virtual void illuminate();
00030 
00031     virtual void handleMotionNotify(XMotionEvent *event);
00032     virtual void handleButtonPress(XButtonEvent *event);
00033     virtual void handleButtonRelease(XButtonEvent *event);
00034 
00035     void setText(const string text);
00036     void setMeterText(const string meterText);
00037 
00038 private:
00039 
00040     unsigned int calculateMetersWidth();
00041     unsigned int calculateWorkspaceWidth();
00042     void invokeClickedThing(int xPosition);
00043 
00044     void updateInputModeButton(unsigned int *offsetX);
00045     void updateWorkspacePager(unsigned int *offsetX);
00046     void updateDetachedClients(unsigned int *offsetX);
00047     void updateStatus(unsigned int *offsetX);
00048     void updateMeters(unsigned int offsetX);
00049 
00050     string meterText_;
00051     string text_;
00052     bool buttonPressed_;
00053 };
00054 
00055 #endif // __STATUSBAR_H

Generated on Thu May 24 15:19:32 2007 for ncwm by  doxygen 1.5.1