restore terminal, rework console

This commit is contained in:
Eduardo Bart
2012-01-07 15:36:58 -02:00
parent a3721b3a11
commit c4b2dd18d6
25 changed files with 265 additions and 143 deletions

View File

@@ -411,6 +411,9 @@ void UILineEdit::onFocusChange(bool focused, Fw::FocusReason reason)
bool UILineEdit::onKeyPress(uchar keyCode, std::string keyText, int keyboardModifiers)
{
if(UIWidget::onKeyPress(keyCode, keyText, keyboardModifiers))
return true;
if(keyCode == Fw::KeyDelete) // erase right character
removeCharacter(true);
else if(keyCode == Fw::KeyBackspace) // erase left character {
@@ -433,8 +436,7 @@ bool UILineEdit::onKeyPress(uchar keyCode, std::string keyText, int keyboardModi
} else if(!keyText.empty() && (keyboardModifiers == Fw::KeyboardNoModifier || keyboardModifiers == Fw::KeyboardShiftModifier))
appendText(keyText);
else
return UIWidget::onKeyPress(keyCode, keyText, keyboardModifiers);
return false;
return true;
}

View File

@@ -1116,8 +1116,12 @@ void UIWidget::onStyleApply(const std::string& styleName, const OTMLNodePtr& sty
// anchors
else if(boost::starts_with(node->tag(), "anchors.")) {
UIWidgetPtr parent = getParent();
if(!parent)
throw OTMLException(node, "cannot create anchor, there is no parent widget!");
if(!parent) {
if(m_firstOnStyle)
throw OTMLException(node, "cannot create anchor, there is no parent widget!");
else
continue;
}
UIAnchorLayoutPtr anchorLayout = parent->getLayout()->asUIAnchorLayout();
if(!anchorLayout)
@@ -1331,9 +1335,7 @@ void UIWidget::propagateOnMouseRelease(const Point& mousePos, Fw::MouseButton bu
child->setPressed(false);
}
// fire release events only when pressed
if(isPressed())
onMouseRelease(mousePos, button);
onMouseRelease(mousePos, button);
}
bool UIWidget::propagateOnMouseMove(const Point& mousePos, const Point& mouseMoved)