summaryrefslogtreecommitdiff
path: root/vcl/source/window/window2.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-01-22 10:20:15 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-01-22 16:29:40 +0000
commit9975c632c3bd142f295fc1d9b1fd6059c3a2dbcb (patch)
tree8497185c0c4564ecefb19fcba56e65d00d76da12 /vcl/source/window/window2.cxx
parent2a3a15fd73d119062228480c22056e9cc9e4d680 (diff)
rework accessibility to be layout aware
Change-Id: I9f8ddfc5007dad6f090abae7e3e0a2d637da0b37
Diffstat (limited to 'vcl/source/window/window2.cxx')
-rw-r--r--vcl/source/window/window2.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 0dc6d1792a6c..906d65bb93e4 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -25,6 +25,7 @@
#include <vcl/bitmap.hxx>
#include <vcl/dialog.hxx>
#include <vcl/event.hxx>
+#include <vcl/fixed.hxx>
#include <vcl/layout.hxx>
#include <vcl/timer.hxx>
#include <vcl/metric.hxx>
@@ -2315,4 +2316,28 @@ void Window::remove_from_all_size_groups()
}
}
+void Window::add_mnemonic_label(FixedText *pLabel)
+{
+ std::vector<FixedText*>& v = mpWindowImpl->m_aMnemonicLabels;
+ if (std::find(v.begin(), v.end(), pLabel) != v.end())
+ return;
+ v.push_back(pLabel);
+ pLabel->set_mnemonic_widget(this);
+}
+
+void Window::remove_mnemonic_label(FixedText *pLabel)
+{
+ std::vector<FixedText*>& v = mpWindowImpl->m_aMnemonicLabels;
+ std::vector<FixedText*>::iterator aFind = std::find(v.begin(), v.end(), pLabel);
+ if (aFind == v.end())
+ return;
+ v.erase(aFind);
+ pLabel->set_mnemonic_widget(NULL);
+}
+
+std::vector<FixedText*> Window::list_mnemonic_labels() const
+{
+ return mpWindowImpl->m_aMnemonicLabels;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */