diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-22 07:46:02 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-22 07:46:02 -0600 |
commit | 65a4b8fb55a576243c6a3b95dfd96c38198b9d1e (patch) | |
tree | c61b76387aa1c5afecb8b89ca57093b6934e3579 /NxWidgets/libnxwidgets/src | |
parent | e65124097e9e6d18a422de28f7e16dad50f665e5 (diff) | |
download | nuttx-65a4b8fb55a576243c6a3b95dfd96c38198b9d1e.tar.gz nuttx-65a4b8fb55a576243c6a3b95dfd96c38198b9d1e.tar.bz2 nuttx-65a4b8fb55a576243c6a3b95dfd96c38198b9d1e.zip |
Make CTabPanel raise action event when tab is changed. Also add a function for getting the currently selected tab index. From Petteri Aimonen
Diffstat (limited to 'NxWidgets/libnxwidgets/src')
-rw-r--r-- | NxWidgets/libnxwidgets/src/ctabpanel.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/NxWidgets/libnxwidgets/src/ctabpanel.cxx b/NxWidgets/libnxwidgets/src/ctabpanel.cxx index ed7524edb..430093d23 100644 --- a/NxWidgets/libnxwidgets/src/ctabpanel.cxx +++ b/NxWidgets/libnxwidgets/src/ctabpanel.cxx @@ -1,7 +1,7 @@ /**************************************************************************** * NxWidgets/libnxwidgets/src/ctabpanel.hxx * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. * Author: Petteri Aimonen <jpa@kapsi.fi> * * Redistribution and use in source and binary forms, with or without @@ -123,8 +123,14 @@ void CTabPanel::handleActionEvent(const CWidgetEventArgs &e) m_buttonbar->isAnyButtonStuckDown(x, y); showPage(x); + m_widgetEventHandlers->raiseActionEvent(); } } - - +uint8_t CTabPanel::getCurrentPageIndex() const +{ + int x = 0; + int y = 0; + m_buttonbar->isAnyButtonStuckDown(x, y); + return x; +} |