Some more keyboard related tweaks.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@661 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-09-02 01:50:55 +00:00
parent 100d48b5a7
commit 44ea7e9cd8
8 changed files with 32 additions and 14 deletions
+6 -1
View File
@@ -18,7 +18,6 @@ DECLARE_TYPEOF_COLLECTION(ValueViewerP);
TextCtrl::TextCtrl(Window* parent, int id, bool multi_line, long style)
: DataEditor(parent, id, style)
, value(nullptr)
, multi_line(multi_line)
{}
TextCtrl::~TextCtrl() {}
@@ -36,6 +35,12 @@ void TextCtrl::draw(DC& dc) {
}
}
bool TextCtrl::AcceptsFocus() const {
return wxControl::AcceptsFocus() &&
!viewers.empty() &&
static_cast<FakeTextValue&>(*viewers.front()->getValue()).editable;
}
TextStyle& TextCtrl::getStyle() {
assert(!viewers.empty());