#include <thing.h>
Inherits Rectangle.
Inherited by Client, and Frame.
Inheritance diagram for Thing:
Public Types | |
enum | Type { CLIENT, FRAME } |
enum | InvertButton { NONE, MINCLIENT, DEMAX, CLOSE } |
Public Member Functions | |
Thing (Monitor *monitor, Rectangle *rect, Type type_) | |
virtual | ~Thing () |
void | initFrameWindow () |
Type | type () const |
Monitor * | monitor () const |
bool | isVisible () const |
void | setTitleBarHeight (unsigned int titleBarHeight) |
unsigned int | titleBarHeight () const |
void | setBorderWidth (unsigned int borderWidth) |
unsigned int | borderWidth () const |
Rectangle * | prevRectangle () const |
InvertButton | buttonState () const |
void | setButtonState (InvertButton state) |
void | handleMotionNotify (XMotionEvent *event) |
virtual Window | window ()=0 |
virtual void | illuminate ()=0 |
virtual void | resize ()=0 |
virtual bool | isFocused ()=0 |
virtual void | handleButtonPress (XButtonEvent *event)=0 |
virtual void | handleButtonRelease (XButtonEvent *event)=0 |
virtual Cursor | cursorForXY (int pointerX, int pointerY)=0 |
virtual void | show () |
virtual void | hide () |
void | setName (string name) |
string | name () const |
bool | hasDecoration () const |
Protected Member Functions | |
void | fitClientArea () |
void | illuminateBorder () |
Protected Attributes | |
bool | isVisible_ |
string | name_ |
Rectangle | clientAreaRect_ |
Theme * | theme_ |
Label * | label_ |
GC | gc_ |
unsigned int | titleBarHeight_ |
unsigned int | borderWidth_ |
bool | areButtonsVisible_ |
Cursor | cursor_ |
InvertButton | buttonState_ |
Window | frameWindow_ |
bool | hasDecoration_ |
Private Member Functions | |
void | initGC () |
Private Attributes | |
Monitor * | monitor_ |
Type | type_ |
Rectangle * | prevRect_ |
Definition at line 30 of file thing.h.
enum Thing::Type |
enum Thing::InvertButton |
Definition at line 22 of file thing.cpp.
References areButtonsVisible_, borderWidth_, buttonState_, clientAreaRect_, cursor_, fitClientArea(), FRAME, frameWindow_, gc_, Util::get(), hasDecoration_, initFrameWindow(), isVisible_, KERNEL, label_, monitor(), monitor_, name_, NONE, Cursors::NORMAL_CURSOR, prevRect_, Rectangle::Rectangle(), Monitor::theme(), theme_, titleBarHeight_, and type_.
Here is the call graph for this function:
Thing::~Thing | ( | ) | [virtual] |
void Thing::initFrameWindow | ( | ) |
Definition at line 67 of file thing.cpp.
References borderWidth_, Label::CENTER, CLIENT, frameWindow_, gc_, Util::get(), hasDecoration_, Rectangle::height(), initGC(), KERNEL, label_, LOGDEBUG, monitor_, Cursors::NORMAL_CURSOR, Rectangle::setHeight(), Rectangle::setWidth(), Rectangle::setX(), Rectangle::setY(), Monitor::titleBarHeight(), titleBarHeight_, type_, Rectangle::width(), Rectangle::x(), XCORE, and Rectangle::y().
Referenced by Client::createFrame(), and Thing().
Here is the call graph for this function:
Thing::Type Thing::type | ( | ) | const |
Definition at line 104 of file thing.cpp.
References type_.
Referenced by Validators::existClientsWithinFrame(), Workspace::focus(), initGC(), Validators::isFloatingClientFocused(), Workspace::resize(), Kernel::runResizeMode(), and Monitor::toggleAllClientStates().
Monitor * Thing::monitor | ( | ) | const |
Definition at line 108 of file thing.cpp.
References monitor_.
Referenced by Client::Client(), Frame::detach(), Frame::handleButtonPress(), Client::handleButtonPress(), Frame::handleButtonRelease(), Client::handleButtonRelease(), Kernel::handleClientMessage(), Client::handleConfigureRequest(), Kernel::handleDestroyNotify(), handleMotionNotify(), Client::handlePropertyNotify(), Frame::illuminate(), Client::illuminate(), illuminateBorder(), initGC(), Kernel::runResizeMode(), and Thing().
bool Thing::isVisible | ( | ) | const |
Definition at line 112 of file thing.cpp.
References isVisible_.
Referenced by Frame::attach(), Frame::detach(), Workspace::detachClient(), Frame::illuminate(), and Monitor::removeClient().
void Thing::setTitleBarHeight | ( | unsigned int | titleBarHeight | ) |
Definition at line 298 of file thing.cpp.
References titleBarHeight_.
Referenced by Actions::toggleBar().
unsigned int Thing::titleBarHeight | ( | ) | const |
Definition at line 310 of file thing.cpp.
References titleBarHeight_.
Referenced by Actions::toggleBar().
void Thing::setBorderWidth | ( | unsigned int | borderWidth | ) |
Definition at line 302 of file thing.cpp.
References borderWidth_.
Referenced by Actions::toggleBorder().
unsigned int Thing::borderWidth | ( | ) | const |
Definition at line 306 of file thing.cpp.
References borderWidth_.
Referenced by Actions::toggleBorder().
Rectangle * Thing::prevRectangle | ( | ) | const |
Definition at line 314 of file thing.cpp.
References prevRect_.
Referenced by Frame::attach(), Frame::detach(), and Monitor::toggleThingMaximization().
Thing::InvertButton Thing::buttonState | ( | ) | const |
void Thing::setButtonState | ( | InvertButton | state | ) |
void Thing::handleMotionNotify | ( | XMotionEvent * | event | ) |
Definition at line 279 of file thing.cpp.
References buttonState_, cursor_, cursorForXY(), frameWindow_, illuminate(), KERNEL, monitor(), and NONE.
Referenced by Kernel::handleMotionNotify().
Here is the call graph for this function:
virtual Window Thing::window | ( | ) | [pure virtual] |
Implemented in Client, and Frame.
Referenced by Workspace::lower(), Kernel::runResizeMode(), and Monitor::toggleThingMaximization().
virtual void Thing::illuminate | ( | ) | [pure virtual] |
Implemented in Client, and Frame.
Referenced by Kernel::handleExpose(), handleMotionNotify(), and Monitor::toggleThingMaximization().
virtual void Thing::resize | ( | ) | [pure virtual] |
Implemented in Client, and Frame.
Referenced by Actions::toggleBar(), Actions::toggleBorder(), and Monitor::toggleThingMaximization().
virtual bool Thing::isFocused | ( | ) | [pure virtual] |
Implemented in Client, and Frame.
Referenced by Kernel::handleMotionNotify(), and illuminateBorder().
virtual void Thing::handleButtonPress | ( | XButtonEvent * | event | ) | [pure virtual] |
virtual void Thing::handleButtonRelease | ( | XButtonEvent * | event | ) | [pure virtual] |
virtual Cursor Thing::cursorForXY | ( | int | pointerX, | |
int | pointerY | |||
) | [pure virtual] |
void Thing::show | ( | ) | [virtual] |
Reimplemented in Client.
Definition at line 326 of file thing.cpp.
References frameWindow_, isVisible_, and XCORE.
Referenced by Workspace::attachFrame().
void Thing::hide | ( | ) | [virtual] |
Reimplemented in Client.
Definition at line 333 of file thing.cpp.
References frameWindow_, isVisible_, and XCORE.
void Thing::setName | ( | string | name | ) |
Definition at line 351 of file thing.cpp.
References name_.
Referenced by Frame::Frame(), Client::handlePropertyNotify(), and Client::initICCCM().
string Thing::name | ( | ) | const |
Definition at line 355 of file thing.cpp.
References name_.
Referenced by Monitor::attachClientByName(), Monitor::focusClientByName(), Client::handleUnmapNotify(), Frame::illuminate(), Client::illuminate(), Client::initICCCM(), and ClientBar::updateClientInfo().
bool Thing::hasDecoration | ( | ) | const |
Definition at line 359 of file thing.cpp.
References hasDecoration_.
Referenced by Workspace::attachClient(), Validators::isFrameOrClientFrameFocused(), and Workspace::resizeClient().
void Thing::fitClientArea | ( | ) | [protected] |
Definition at line 340 of file thing.cpp.
References borderWidth_, clientAreaRect_, Rectangle::height(), Rectangle::setHeight(), Rectangle::setWidth(), Rectangle::setX(), Rectangle::setY(), titleBarHeight_, and Rectangle::width().
Referenced by Client::createFrame(), Client::handleConfigureRequest(), Frame::resize(), Client::resize(), and Thing().
Here is the call graph for this function:
void Thing::illuminateBorder | ( | ) | [protected] |
Definition at line 135 of file thing.cpp.
References areButtonsVisible_, borderWidth_, 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, buttonState_, Monitor::buttonWidth(), CLIENT, CLOSE, DEMAX, Draw::drawBorder(), Draw::drawCloseButton(), Draw::drawDetachButton(), Draw::drawFloatButton(), Draw::drawMaxButton(), FRAME, Theme::FRAME_BACKGROUND_FOCUSSED, Theme::FRAME_BACKGROUND_NORMAL, Theme::FRAME_SHADOW_FOCUSSED, Theme::FRAME_SHADOW_NORMAL, Theme::FRAME_SHINE_FOCUSSED, Theme::FRAME_SHINE_NORMAL, frameWindow_, gc_, isFocused(), isVisible_, label_, LOGDEBUG, MINCLIENT, monitor(), monitor_, Label::setText(), Rectangle::setWidth(), Rectangle::setX(), theme_, titleBarHeight_, type_, Label::update(), Rectangle::width(), and Rectangle::x().
Referenced by Frame::illuminate(), and Client::illuminate().
Here is the call graph for this function:
void Thing::initGC | ( | ) | [private] |
Definition at line 116 of file thing.cpp.
References Monitor::font(), frameWindow_, gc_, monitor(), WFont::NORMAL, type(), and XCORE.
Referenced by initFrameWindow().
Here is the call graph for this function:
bool Thing::isVisible_ [protected] |
Definition at line 92 of file thing.h.
Referenced by Client::handleUnmapNotify(), hide(), Client::hide(), Client::illuminate(), illuminateBorder(), isVisible(), show(), Client::show(), and Thing().
string Thing::name_ [protected] |
Rectangle Thing::clientAreaRect_ [protected] |
Definition at line 98 of file thing.h.
Referenced by Frame::attach(), Frame::cursorForXY(), Client::cursorForXY(), fitClientArea(), Client::handleConfigureRequest(), Frame::matchClientSize(), Frame::resize(), Client::resize(), Client::sendConfiguration(), and Thing().
Theme* Thing::theme_ [protected] |
Definition at line 99 of file thing.h.
Referenced by Frame::illuminate(), Client::illuminate(), illuminateBorder(), and Thing().
Label* Thing::label_ [protected] |
Definition at line 100 of file thing.h.
Referenced by Frame::illuminate(), Client::illuminate(), illuminateBorder(), initFrameWindow(), Frame::resize(), Client::resize(), Thing(), and ~Thing().
GC Thing::gc_ [protected] |
Definition at line 101 of file thing.h.
Referenced by Frame::illuminate(), Client::illuminate(), illuminateBorder(), initFrameWindow(), initGC(), Thing(), and ~Thing().
unsigned int Thing::titleBarHeight_ [protected] |
Definition at line 102 of file thing.h.
Referenced by Frame::cursorForXY(), Client::cursorForXY(), fitClientArea(), Client::gravitate(), Frame::handleButtonPress(), Client::handleButtonPress(), Frame::handleButtonRelease(), Client::handleButtonRelease(), Client::handleConfigureRequest(), Frame::illuminate(), Client::illuminate(), illuminateBorder(), initFrameWindow(), setTitleBarHeight(), Thing(), and titleBarHeight().
unsigned int Thing::borderWidth_ [protected] |
Definition at line 103 of file thing.h.
Referenced by borderWidth(), Client::Client(), Frame::cursorForXY(), Client::cursorForXY(), fitClientArea(), Client::gravitate(), Frame::handleButtonPress(), Client::handleButtonPress(), Client::handleConfigureRequest(), Frame::illuminate(), Client::illuminate(), illuminateBorder(), initFrameWindow(), Frame::resize(), Client::resize(), setBorderWidth(), and Thing().
bool Thing::areButtonsVisible_ [protected] |
Definition at line 104 of file thing.h.
Referenced by Frame::handleButtonPress(), Client::handleButtonPress(), Frame::illuminate(), Client::illuminate(), illuminateBorder(), and Thing().
Cursor Thing::cursor_ [protected] |
Definition at line 106 of file thing.h.
Referenced by Frame::handleButtonPress(), Client::handleButtonPress(), Client::handleButtonRelease(), handleMotionNotify(), and Thing().
InvertButton Thing::buttonState_ [protected] |
Definition at line 108 of file thing.h.
Referenced by buttonState(), Frame::handleButtonPress(), Client::handleButtonPress(), Frame::handleButtonRelease(), Client::handleButtonRelease(), handleMotionNotify(), illuminateBorder(), setButtonState(), and Thing().
Window Thing::frameWindow_ [protected] |
Definition at line 111 of file thing.h.
Referenced by Client::frameWindow(), handleMotionNotify(), hide(), Frame::illuminate(), illuminateBorder(), initFrameWindow(), initGC(), show(), Thing(), Frame::window(), Client::window(), and ~Thing().
bool Thing::hasDecoration_ [protected] |
Definition at line 112 of file thing.h.
Referenced by Client::handlePropertyNotify(), hasDecoration(), initFrameWindow(), Client::initICCCM(), and Thing().
Monitor* Thing::monitor_ [private] |
Definition at line 119 of file thing.h.
Referenced by illuminateBorder(), initFrameWindow(), monitor(), and Thing().
Type Thing::type_ [private] |
Definition at line 120 of file thing.h.
Referenced by illuminateBorder(), initFrameWindow(), Thing(), and type().
Rectangle* Thing::prevRect_ [private] |