#include <menu.h>
Inherits Widget.
Inheritance diagram for Menu:
Public Member Functions | |
Menu (Monitor *monitor) | |
Menu class implementation. | |
~Menu () | |
void | manage () |
void | updateItemTree () |
void | illuminate () |
void | handleButtonPress (XButtonEvent *event) |
void | handleMotionNotify (XMotionEvent *event) |
virtual void | show () |
virtual void | hide () |
Private Member Functions | |
void | initActions () |
void | escape () |
Private Attributes | |
Theme * | theme_ |
Label * | label_ |
LAction | actions_ |
Item * | root_ |
Item * | subRoot_ |
Item * | selected_ |
Definition at line 79 of file menu.h.
Menu::Menu | ( | Monitor * | monitor | ) |
Menu class implementation.
Definition at line 119 of file menu.cpp.
References Widget::gc(), initActions(), label_, Label::LEFT, Widget::monitor(), root_, selected_, Rectangle::setHeight(), Rectangle::setWidth(), Rectangle::setX(), Rectangle::setY(), subRoot_, Monitor::theme(), theme_, and Widget::window().
Here is the call graph for this function:
void Menu::manage | ( | ) |
Definition at line 272 of file menu.cpp.
References Rectangle::height(), illuminate(), Widget::isVisible(), Item::items(), label_, Widget::monitor(), Widget::resize(), Rectangle::setHeight(), Label::setText(), Rectangle::setWidth(), Rectangle::setY(), subRoot_, Label::textWidth(), and Rectangle::y().
Referenced by handleButtonPress(), and show().
Here is the call graph for this function:
void Menu::updateItemTree | ( | ) |
Definition at line 165 of file menu.cpp.
References Item::ACTION, actions_, Item::addItem(), Container< P, LT, LTI, T >::begin(), Item::CLIENT, Item::DCLIENT, Monitor::detachedClients(), Container< P, LT, LTI, T >::end(), Item::items(), Widget::monitor(), Item::ROOT, root_, Item::SEPARATOR, Container< P, LT, LTI, T >::size(), Client::STICKY, Monitor::stickyClients(), subRoot_, and Item::WORKSPACE.
Referenced by handleButtonPress(), and show().
Here is the call graph for this function:
void Menu::illuminate | ( | ) |
called on Expose by Kernel.
Definition at line 234 of file menu.cpp.
References Theme::BAR_BACKGROUND, Theme::BAR_SHADOW, Theme::BAR_SHINE, Draw::drawRectBorder(), Widget::gc(), Rectangle::height(), Item::items(), 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, LOGDEBUG, selected_, Item::SEPARATOR, Label::setText(), Rectangle::setX(), Rectangle::setY(), subRoot_, theme_, Label::update(), Widget::window(), and XCORE.
Referenced by handleMotionNotify(), and manage().
Here is the call graph for this function:
void Menu::handleButtonPress | ( | XButtonEvent * | event | ) |
Definition at line 303 of file menu.cpp.
References Item::ACTION, Monitor::attachDetachedClient(), Monitor::attachLastClient(), Item::CLIENT, Client::clientWindow(), Item::data(), Item::DCLIENT, Monitor::detachClient(), escape(), Workspace::focus(), Monitor::focus(), Rectangle::height(), Action::isValid(), Item::items(), manage(), Widget::monitor(), Item::parent(), Action::perform(), Item::ROOTITEM, selected_, subRoot_, Item::type(), updateItemTree(), Rectangle::width(), Widget::window(), Item::WORKSPACE, Rectangle::x(), XCORE, and Rectangle::y().
Referenced by Kernel::handleButtonPress().
Here is the call graph for this function:
void Menu::handleMotionNotify | ( | XMotionEvent * | event | ) |
Definition at line 385 of file menu.cpp.
References Rectangle::height(), illuminate(), Item::items(), label_, LOGDEBUG, selected_, and subRoot_.
Referenced by Kernel::handleMotionNotify().
Here is the call graph for this function:
void Menu::show | ( | ) | [virtual] |
Reimplemented from Widget.
Definition at line 220 of file menu.cpp.
References Widget::isVisible_, KERNEL, manage(), updateItemTree(), Widget::window(), and XCORE.
Referenced by ClientBar::toggleMenuMode().
Here is the call graph for this function:
void Menu::hide | ( | ) | [virtual] |
Reimplemented from Widget.
Definition at line 228 of file menu.cpp.
References Widget::isVisible_, KERNEL, Widget::window(), and XCORE.
Referenced by ClientBar::toggleMenuMode().
Here is the call graph for this function:
void Menu::initActions | ( | ) | [private] |
void Menu::escape | ( | ) | [private] |
Definition at line 381 of file menu.cpp.
References Monitor::clientBar(), Widget::monitor(), and ClientBar::toggleMenuMode().
Referenced by handleButtonPress().
Here is the call graph for this function:
Theme* Menu::theme_ [private] |
Label* Menu::label_ [private] |
Definition at line 106 of file menu.h.
Referenced by handleMotionNotify(), illuminate(), manage(), and Menu().
LAction Menu::actions_ [private] |
Item* Menu::root_ [private] |
Item* Menu::subRoot_ [private] |
Definition at line 109 of file menu.h.
Referenced by handleButtonPress(), handleMotionNotify(), illuminate(), manage(), Menu(), and updateItemTree().
Item* Menu::selected_ [private] |
Definition at line 110 of file menu.h.
Referenced by handleButtonPress(), handleMotionNotify(), illuminate(), and Menu().