aboutsummaryrefslogtreecommitdiff
path: root/src/FocusModelMenuItem.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FocusModelMenuItem.hh')
-rw-r--r--src/FocusModelMenuItem.hh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/FocusModelMenuItem.hh b/src/FocusModelMenuItem.hh
index a48d0b4..3c7dd89 100644
--- a/src/FocusModelMenuItem.hh
+++ b/src/FocusModelMenuItem.hh
@@ -50,4 +50,24 @@ private:
50 BScreen::FocusModel m_focusmodel; 50 BScreen::FocusModel m_focusmodel;
51}; 51};
52 52
53class TabFocusModelMenuItem : public FbTk::MenuItem {
54public:
55 TabFocusModelMenuItem(const char *label, BScreen &screen,
56 BScreen::TabFocusModel model,
57 FbTk::RefCount<FbTk::Command> &cmd):
58 FbTk::MenuItem(label, cmd), m_screen(screen), m_tabfocusmodel(model) {
59 }
60 bool isEnabled() const { return m_screen.getTabFocusModel() != m_tabfocusmodel; }
61
62 void click(int button, int time) {
63 m_screen.saveTabFocusModel(m_tabfocusmodel);
64 FbTk::MenuItem::click(button, time);
65 }
66
67private:
68 BScreen &m_screen;
69 BScreen::TabFocusModel m_tabfocusmodel;
70};
71
72
53#endif // FOCUSMODELMENUITEM_HH 73#endif // FOCUSMODELMENUITEM_HH