InputBar Class Reference

#include <inputbar.h>

Inherits Bar.

Inheritance diagram for InputBar:

Inheritance graph
[legend]
Collaboration diagram for InputBar:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 InputBar (Monitor *monitor, Rectangle *rect)
 ~InputBar ()
virtual void illuminate ()
virtual void handleMotionNotify (XMotionEvent *event)
virtual void handleButtonPress (XButtonEvent *event)
virtual void handleButtonRelease (XButtonEvent *event)
void handleInput (XKeyEvent *event)
void handlePressedReturn ()
void runKey (Prompt *prompt)
void runArgument (Action *action)

Private Member Functions

bool isArgument () const
string text (bool onExecEnter=false)
void queryText (string text)
void removeChar ()
void clearPrevPartitionsStack ()
void selectNextEntry ()
void selectPrevEntry ()
void escape ()

Private Attributes

ActioncurrAction_
Sstring names_
bool isArgument_
Sstring::iterator entryBegin_
Sstring::iterator entryEnd_
Sstring::iterator partitionBegin_
Sstring::iterator partitionEnd_
Sstring::iterator selected_
SSstringIter prevPartitions_
Promptprompt_
string text_
string args_
unsigned int promptCounter_

Detailed Description

Represents the input bar and input mode of NCWM.

Definition at line 27 of file inputbar.h.


Constructor & Destructor Documentation

InputBar::InputBar ( Monitor monitor,
Rectangle rect 
)

Definition at line 25 of file inputbar.cpp.

References args_, currAction_, entryBegin_, entryEnd_, isArgument_, LOGDEBUG, partitionBegin_, prompt_, promptCounter_, and selected_.

InputBar::~InputBar (  ) 

Definition at line 40 of file inputbar.cpp.


Member Function Documentation

void InputBar::illuminate (  )  [virtual]

Implements Bar.

Definition at line 89 of file inputbar.cpp.

References Label::adjustWidth(), Theme::BAR_BACKGROUND, Theme::BAR_SHADOW, Theme::BAR_SHINE, Theme::BAR_TEXT, Label::CENTER, Bar::drawBorder(), entryBegin_, entryEnd_, Widget::isVisible(), 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, LOGDEBUG, partitionBegin_, partitionEnd_, Prompt::prompt(), prompt_, selected_, Label::setAlignment(), Label::setText(), Rectangle::setWidth(), Rectangle::setX(), text_, Bar::theme_, Label::update(), Rectangle::width(), and Rectangle::x().

Referenced by handleInput(), handlePressedReturn(), removeChar(), runArgument(), and runKey().

Here is the call graph for this function:

void InputBar::handleMotionNotify ( XMotionEvent *  event  )  [virtual]

Implements Bar.

Definition at line 451 of file inputbar.cpp.

void InputBar::handleButtonPress ( XButtonEvent *  event  )  [virtual]

Implements Bar.

Definition at line 455 of file inputbar.cpp.

References escape().

Here is the call graph for this function:

void InputBar::handleButtonRelease ( XButtonEvent *  event  )  [virtual]

Implements Bar.

Definition at line 459 of file inputbar.cpp.

void InputBar::handleInput ( XKeyEvent *  event  ) 

Handler for input key events.

Definition at line 242 of file inputbar.cpp.

References escape(), handlePressedReturn(), illuminate(), Singleton< Binder >::instance(), Widget::isVisible(), names_, queryText(), removeChar(), selectNextEntry(), selectPrevEntry(), text(), text_, and XCORE.

Referenced by Kernel::handleKeyPress().

Here is the call graph for this function:

void InputBar::handlePressedReturn (  ) 

Definition at line 355 of file inputbar.cpp.

References args_, currAction_, escape(), Actions::execute(), Actions::executeTerm(), Util::get(), Action::getToPerform(), illuminate(), isArgument_, KERNEL, LOGDEBUG, Action::perform(), Action::prompt(), prompt_, promptCounter_, Action::promptsCount(), queryText(), Action::setArgument(), and text().

Referenced by handleInput().

Here is the call graph for this function:

void InputBar::runKey ( Prompt prompt  ) 

Definition at line 423 of file inputbar.cpp.

References currAction_, illuminate(), isArgument_, Widget::isVisible(), prompt_, queryText(), Widget::show(), Widget::window(), and XCORE.

Referenced by StatusBar::handleButtonRelease(), and Actions::inputMode().

Here is the call graph for this function:

void InputBar::runArgument ( Action action  ) 

Definition at line 435 of file inputbar.cpp.

References currAction_, illuminate(), isArgument_, Action::isValid(), Widget::isVisible(), Action::prompt(), prompt_, queryText(), Widget::show(), Widget::window(), and XCORE.

Referenced by Kernel::handlePropertyNotify().

Here is the call graph for this function:

bool InputBar::isArgument (  )  const [private]

Definition at line 463 of file inputbar.cpp.

References isArgument_.

string InputBar::text ( bool  onExecEnter = false  )  [private]

Definition at line 166 of file inputbar.cpp.

References entryBegin_, entryEnd_, selected_, and text_.

Referenced by handleInput(), and handlePressedReturn().

void InputBar::queryText ( string  text  )  [private]

Definition at line 219 of file inputbar.cpp.

References clearPrevPartitionsStack(), entryBegin_, entryEnd_, Singleton< Binder >::instance(), Widget::isVisible(), names_, partitionBegin_, prompt_, selected_, text_, and Prompt::toQuery().

Referenced by handleInput(), handlePressedReturn(), removeChar(), runArgument(), and runKey().

Here is the call graph for this function:

void InputBar::removeChar (  )  [private]

Definition at line 187 of file inputbar.cpp.

References illuminate(), Singleton< Binder >::instance(), Widget::isVisible(), LOGDEBUG, names_, prompt_, queryText(), text_, and Prompt::toQuery().

Referenced by handleInput().

Here is the call graph for this function:

void InputBar::clearPrevPartitionsStack (  )  [private]

Definition at line 181 of file inputbar.cpp.

References prevPartitions_.

Referenced by queryText(), selectNextEntry(), and selectPrevEntry().

void InputBar::selectNextEntry (  )  [private]

Definition at line 67 of file inputbar.cpp.

References clearPrevPartitionsStack(), entryBegin_, entryEnd_, partitionBegin_, partitionEnd_, prevPartitions_, and selected_.

Referenced by handleInput().

Here is the call graph for this function:

void InputBar::selectPrevEntry (  )  [private]

Definition at line 43 of file inputbar.cpp.

References clearPrevPartitionsStack(), entryBegin_, entryEnd_, partitionBegin_, prevPartitions_, and selected_.

Referenced by handleInput().

Here is the call graph for this function:

void InputBar::escape (  )  [private]

Definition at line 342 of file inputbar.cpp.

References args_, currAction_, Widget::hide(), Singleton< Binder >::instance(), prompt_, promptCounter_, and XCORE.

Referenced by handleButtonPress(), handleInput(), and handlePressedReturn().

Here is the call graph for this function:


Member Data Documentation

Action* InputBar::currAction_ [private]

Provides argument processing.

Definition at line 65 of file inputbar.h.

Referenced by escape(), handlePressedReturn(), InputBar(), runArgument(), and runKey().

Sstring InputBar::names_ [private]

Definition at line 67 of file inputbar.h.

Referenced by handleInput(), queryText(), and removeChar().

bool InputBar::isArgument_ [private]

Definition at line 69 of file inputbar.h.

Referenced by handlePressedReturn(), InputBar(), isArgument(), runArgument(), and runKey().

Sstring::iterator InputBar::entryBegin_ [private]

Definition at line 70 of file inputbar.h.

Referenced by illuminate(), InputBar(), queryText(), selectNextEntry(), selectPrevEntry(), and text().

Sstring::iterator InputBar::entryEnd_ [private]

Definition at line 71 of file inputbar.h.

Referenced by illuminate(), InputBar(), queryText(), selectNextEntry(), selectPrevEntry(), and text().

Sstring::iterator InputBar::partitionBegin_ [private]

Definition at line 72 of file inputbar.h.

Referenced by illuminate(), InputBar(), queryText(), selectNextEntry(), and selectPrevEntry().

Sstring::iterator InputBar::partitionEnd_ [private]

Definition at line 73 of file inputbar.h.

Referenced by illuminate(), and selectNextEntry().

Sstring::iterator InputBar::selected_ [private]

Definition at line 74 of file inputbar.h.

Referenced by illuminate(), InputBar(), queryText(), selectNextEntry(), selectPrevEntry(), and text().

SSstringIter InputBar::prevPartitions_ [private]

Definition at line 75 of file inputbar.h.

Referenced by clearPrevPartitionsStack(), selectNextEntry(), and selectPrevEntry().

Prompt* InputBar::prompt_ [private]

Definition at line 76 of file inputbar.h.

Referenced by escape(), handlePressedReturn(), illuminate(), InputBar(), queryText(), removeChar(), runArgument(), and runKey().

string InputBar::text_ [private]

Definition at line 77 of file inputbar.h.

Referenced by handleInput(), illuminate(), queryText(), removeChar(), and text().

string InputBar::args_ [private]

Definition at line 78 of file inputbar.h.

Referenced by escape(), handlePressedReturn(), and InputBar().

unsigned int InputBar::promptCounter_ [private]

Definition at line 79 of file inputbar.h.

Referenced by escape(), handlePressedReturn(), and InputBar().


The documentation for this class was generated from the following files:
Generated on Thu May 24 15:20:07 2007 for ncwm by  doxygen 1.5.1