tbx  0.7.6
tabsselectionlistener.h
1 #ifndef TAB_SELECTED_LISTENER_H
2 #define TAB_SELECTED_LISTENER_H
3 
4 
5 #include "../gadget.h"
6 #include "../listener.h"
7 #include "../eventinfo.h"
8 
9 namespace tbx
10 {
11 namespace ext
12 {
13 
18 {
19 public:
24  EventInfo(id_block, data) {};
25 
29  int selected() const {return _data.word[5];}
30 
34  int previous() const {return _data.word[6];}
35 };
36 
41 {
42 public:
44  virtual ~TabsSelectionListener() {};
45 
46  virtual void tabs_selection(const TabsSelectionEvent &event) = 0;
47 };
48 
49 }
50 }
51 
52 #endif
tbx
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
tbx::ext::TabsSelectionEvent::TabsSelectionEvent
TabsSelectionEvent(IdBlock &id_block, PollBlock &data)
Construct the event.
Definition: tabsselectionlistener.h:23
tbx::EventInfo::id_block
const IdBlock & id_block() const
IdBlock for the current event.
Definition: eventinfo.h:71
tbx::EventInfo::_data
PollBlock & _data
raw data from the event
Definition: eventinfo.h:53
tbx::ext::TabsSelectionEvent
A tab has been selected event information.
Definition: tabsselectionlistener.h:18
tbx::PollBlock
Structure holding the raw data from a call to Wimp_Poll.
Definition: pollinfo.h:72
tbx::ext::TabsSelectionListener
Listener for change of tab.
Definition: tabsselectionlistener.h:41
tbx::IdBlock
Information passed back by the Toolbox with each toolbox event providing information on where the eve...
Definition: pollinfo.h:42
tbx::Listener
Base class for all toolbox event listeners.
Definition: listener.h:34
tbx::ext::TabsSelectionEvent::selected
int selected() const
The new index of the tab.
Definition: tabsselectionlistener.h:29
tbx::PollBlock::word
int word[64]
Array containing information return from Wimp_Poll.
Definition: pollinfo.h:76
tbx::EventInfo
Class to provide information on a toolbox event.
Definition: eventinfo.h:49
tbx::ext::TabsSelectionEvent::previous
int previous() const
The index of the tab prior to the selection.
Definition: tabsselectionlistener.h:34