#include <statusbar.h>
Inherits Bar.
Inheritance diagram for StatusBar:
Public Member Functions | |
StatusBar (Monitor *monitor, Rectangle *rect) | |
~StatusBar () | |
virtual void | illuminate () |
virtual void | handleMotionNotify (XMotionEvent *event) |
virtual void | handleButtonPress (XButtonEvent *event) |
virtual void | handleButtonRelease (XButtonEvent *event) |
void | setText (const string text) |
void | setMeterText (const string meterText) |
Private Member Functions | |
unsigned int | calculateMetersWidth () |
unsigned int | calculateWorkspaceWidth () |
void | invokeClickedThing (int xPosition) |
void | updateInputModeButton (unsigned int *offsetX) |
void | updateWorkspacePager (unsigned int *offsetX) |
void | updateDetachedClients (unsigned int *offsetX) |
void | updateStatus (unsigned int *offsetX) |
void | updateMeters (unsigned int offsetX) |
Private Attributes | |
string | meterText_ |
string | text_ |
bool | buttonPressed_ |
Definition at line 21 of file statusbar.h.
StatusBar::~StatusBar | ( | ) |
Definition at line 62 of file statusbar.cpp.
void StatusBar::illuminate | ( | ) | [virtual] |
Implements Bar.
Definition at line 36 of file statusbar.cpp.
References Theme::BAR_BACKGROUND, Theme::BAR_SHADOW, Theme::BAR_SHINE, Theme::BAR_TEXT, Label::CENTER, Bar::drawBorder(), Widget::isVisible(), Bar::label_, LOGDEBUG, Label::setAlignment(), Label::setText(), Rectangle::setWidth(), Rectangle::setX(), Bar::theme_, Label::update(), updateInputModeButton(), updateMeters(), updateStatus(), updateWorkspacePager(), Rectangle::width(), and XCORE.
Referenced by Monitor::detachAllClients(), handleMotionNotify(), Client::handlePropertyNotify(), invokeClickedThing(), Monitor::removeClient(), Monitor::toggleAllClientStates(), and Monitor::updateBars().
Here is the call graph for this function:
void StatusBar::handleMotionNotify | ( | XMotionEvent * | event | ) | [virtual] |
Implements Bar.
Definition at line 323 of file statusbar.cpp.
References buttonPressed_, and illuminate().
Here is the call graph for this function:
void StatusBar::handleButtonPress | ( | XButtonEvent * | event | ) | [virtual] |
Implements Bar.
Definition at line 303 of file statusbar.cpp.
References Monitor::focus(), invokeClickedThing(), Widget::monitor(), Widget::window(), and XCORE.
Here is the call graph for this function:
void StatusBar::handleButtonRelease | ( | XButtonEvent * | event | ) | [virtual] |
Implements Bar.
Definition at line 291 of file statusbar.cpp.
References buttonPressed_, Monitor::inputBar(), KERNEL, LOGDEBUG, Widget::monitor(), and InputBar::runKey().
Here is the call graph for this function:
void StatusBar::setText | ( | const string | text | ) |
Definition at line 349 of file statusbar.cpp.
References text_.
Referenced by Monitor::updateBars().
void StatusBar::setMeterText | ( | const string | meterText | ) |
Definition at line 353 of file statusbar.cpp.
References meterText_.
Referenced by Monitor::updateBars().
unsigned int StatusBar::calculateMetersWidth | ( | ) | [private] |
Definition at line 158 of file statusbar.cpp.
References Monitor::buttonWidth(), Bar::label_, Label::LEFT, meterText_, Widget::monitor(), Label::setAlignment(), Label::setText(), and Label::textWidth().
Referenced by updateStatus().
Here is the call graph for this function:
unsigned int StatusBar::calculateWorkspaceWidth | ( | ) | [private] |
Definition at line 96 of file statusbar.cpp.
References Label::adjustWidth(), Container< P, LT, LTI, T >::end(), Container< P, LT, LTI, T >::focused(), Bar::label_, Widget::monitor(), Label::setText(), and Rectangle::width().
Referenced by invokeClickedThing(), and updateWorkspacePager().
Here is the call graph for this function:
void StatusBar::invokeClickedThing | ( | int | xPosition | ) | [private] |
Definition at line 331 of file statusbar.cpp.
References buttonPressed_, Monitor::buttonWidth(), calculateWorkspaceWidth(), Monitor::focusWorkspaceNum(), illuminate(), Bar::isButtonVisible_, and Widget::monitor().
Referenced by handleButtonPress().
Here is the call graph for this function:
void StatusBar::updateInputModeButton | ( | unsigned int * | offsetX | ) | [private] |
Definition at line 65 of file statusbar.cpp.
References Theme::BUTTON_BACKGROUND_NORMAL, Theme::BUTTON_BACKGROUND_PRESSED, Theme::BUTTON_SHADOW_BORDER_NORMAL, Theme::BUTTON_SHADOW_BORDER_PRESSED, Theme::BUTTON_SHADOW_FIGURE_NORMAL, Theme::BUTTON_SHADOW_FIGURE_PRESSED, Theme::BUTTON_SHINE_BORDER_NORMAL, Theme::BUTTON_SHINE_BORDER_PRESSED, Theme::BUTTON_SHINE_FIGURE_NORMAL, Theme::BUTTON_SHINE_FIGURE_PRESSED, buttonPressed_, Monitor::buttonWidth(), Draw::drawInputModeButton(), Widget::gc(), Bar::isButtonVisible_, Bar::label_, Widget::monitor(), Label::setText(), Rectangle::setWidth(), Rectangle::setX(), Bar::theme_, and Widget::window().
Referenced by illuminate().
Here is the call graph for this function:
void StatusBar::updateWorkspacePager | ( | unsigned int * | offsetX | ) | [private] |
Definition at line 118 of file statusbar.cpp.
References calculateWorkspaceWidth(), Container< P, LT, LTI, T >::end(), Container< P, LT, LTI, T >::focused(), Theme::FOCUSREQ_BACKGROUND, Theme::FOCUSREQ_SHADOW, Theme::FOCUSREQ_SHINE, Theme::FOCUSREQ_TEXT, Bar::label_, Theme::LABEL_BACKGROUND_FOCUSSED, Theme::LABEL_BACKGROUND_NORMAL, Theme::LABEL_SHADOW_FOCUSSED, Theme::LABEL_SHADOW_NORMAL, Theme::LABEL_SHINE_FOCUSSED, Theme::LABEL_SHINE_NORMAL, Theme::LABEL_TEXT_FOCUSSED, Theme::LABEL_TEXT_NORMAL, Widget::monitor(), Label::setText(), Rectangle::setWidth(), Rectangle::setX(), Bar::theme_, and Label::update().
Referenced by illuminate().
Here is the call graph for this function:
void StatusBar::updateDetachedClients | ( | unsigned int * | offsetX | ) | [private] |
void StatusBar::updateStatus | ( | unsigned int * | offsetX | ) | [private] |
Definition at line 276 of file statusbar.cpp.
References Theme::BAR_BACKGROUND, Theme::BAR_SHADOW, Theme::BAR_SHINE, Theme::BAR_TEXT, calculateMetersWidth(), Bar::label_, Label::RIGHT, Label::setAlignment(), Label::setText(), Rectangle::setWidth(), Rectangle::setX(), text_, Bar::theme_, Label::update(), Rectangle::width(), and Rectangle::x().
Referenced by illuminate().
Here is the call graph for this function:
void StatusBar::updateMeters | ( | unsigned int | offsetX | ) | [private] |
Definition at line 206 of file statusbar.cpp.
References Label::adjustWidth(), Theme::BAR_BACKGROUND, Theme::BAR_SHADOW, Theme::BAR_SHINE, Theme::BAR_TEXT, Monitor::buttonWidth(), Draw::drawMeter(), Widget::gc(), Bar::label_, Label::LEFT, Theme::METER_BACKGROUND, Theme::METER_BORDER_SHADOW, Theme::METER_BORDER_SHINE, Theme::METER_FIGURE_HIGH, Theme::METER_FIGURE_LOW, Theme::METER_FIGURE_NORMAL, meterText_, Widget::monitor(), Label::setAlignment(), Label::setText(), Rectangle::setWidth(), Rectangle::setX(), Util::strToUInt(), Bar::theme_, Label::update(), Rectangle::width(), Widget::window(), and Rectangle::x().
Referenced by illuminate().
Here is the call graph for this function:
string StatusBar::meterText_ [private] |
Definition at line 50 of file statusbar.h.
Referenced by calculateMetersWidth(), setMeterText(), and updateMeters().
string StatusBar::text_ [private] |
Definition at line 51 of file statusbar.h.
Referenced by setText(), StatusBar(), and updateStatus().
bool StatusBar::buttonPressed_ [private] |
Definition at line 52 of file statusbar.h.
Referenced by handleButtonRelease(), handleMotionNotify(), invokeClickedThing(), StatusBar(), and updateInputModeButton().