summaryrefslogtreecommitdiff
path: root/src/FocusControl.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FocusControl.hh')
-rw-r--r--src/FocusControl.hh31
1 files changed, 13 insertions, 18 deletions
diff --git a/src/FocusControl.hh b/src/FocusControl.hh
index 4e2ceab..84f0269 100644
--- a/src/FocusControl.hh
+++ b/src/FocusControl.hh
@@ -27,6 +27,7 @@
27#include <list> 27#include <list>
28 28
29#include "FbTk/Resource.hh" 29#include "FbTk/Resource.hh"
30#include "FocusableList.hh"
30 31
31class ClientPattern; 32class ClientPattern;
32class WinClient; 33class WinClient;
@@ -60,12 +61,6 @@ public:
60 FOCUSRIGHT ///< window is right 61 FOCUSRIGHT ///< window is right
61 }; 62 };
62 63
63 /// prevFocus/nextFocus option bits
64 enum {
65 CYCLEGROUPS = 0x01, //< cycle through groups
66 CYCLELINEAR = 0x08, ///< linear cycle
67 };
68
69 explicit FocusControl(BScreen &screen); 64 explicit FocusControl(BScreen &screen);
70 /// cycle previous focuable 65 /// cycle previous focuable
71 void prevFocus() { cycleFocus(m_focused_list, 0, true); } 66 void prevFocus() { cycleFocus(m_focused_list, 0, true); }
@@ -77,10 +72,10 @@ public:
77 * @param pat pattern for matching focusables 72 * @param pat pattern for matching focusables
78 * @param reverse reverse the cycle order 73 * @param reverse reverse the cycle order
79 */ 74 */
80 void cycleFocus(const Focusables &winlist, const ClientPattern *pat = 0, 75 void cycleFocus(const FocusableList &winlist, const ClientPattern *pat = 0,
81 bool reverse = false); 76 bool reverse = false);
82 77
83 void goToWindowNumber(const Focusables &winlist, int num, 78 void goToWindowNumber(const FocusableList &winlist, int num,
84 const ClientPattern *pat = 0); 79 const ClientPattern *pat = 0);
85 /// sets the focused window on a screen 80 /// sets the focused window on a screen
86 void setScreenFocusedWindow(WinClient &win_client); 81 void setScreenFocusedWindow(WinClient &win_client);
@@ -108,7 +103,7 @@ public:
108 void addFocusFront(WinClient &client); 103 void addFocusFront(WinClient &client);
109 void addFocusWinBack(Focusable &win); 104 void addFocusWinBack(Focusable &win);
110 void addFocusWinFront(Focusable &win); 105 void addFocusWinFront(Focusable &win);
111 void setFocusBack(FluxboxWindow *fbwin); 106 void setFocusBack(FluxboxWindow &fbwin);
112 /// @return main focus model 107 /// @return main focus model
113 FocusModel focusModel() const { return *m_focus_model; } 108 FocusModel focusModel() const { return *m_focus_model; }
114 /// @return tab focus model 109 /// @return tab focus model
@@ -122,11 +117,11 @@ public:
122 WinClient *lastFocusedWindow(FluxboxWindow &group, WinClient *ignore_client = 0); 117 WinClient *lastFocusedWindow(FluxboxWindow &group, WinClient *ignore_client = 0);
123 118
124 /// @return focus list in creation order 119 /// @return focus list in creation order
125 const Focusables &creationOrderList() const { return m_creation_order_list; } 120 const FocusableList &creationOrderList() const { return m_creation_order_list; }
126 /// @return the focus list in focused order 121 /// @return the focus list in focused order
127 const Focusables &focusedOrderList() const { return m_focused_list; } 122 const FocusableList &focusedOrderList() const { return m_focused_list; }
128 const Focusables &creationOrderWinList() const { return m_creation_order_win_list; } 123 const FocusableList &creationOrderWinList() const { return m_creation_order_win_list; }
129 const Focusables &focusedOrderWinList() const { return m_focused_win_list; } 124 const FocusableList &focusedOrderWinList() const { return m_focused_win_list; }
130 125
131 /// remove client from focus list 126 /// remove client from focus list
132 void removeClient(WinClient &client); 127 void removeClient(WinClient &client);
@@ -153,13 +148,13 @@ private:
153 148
154 // This list keeps the order of window focusing for this screen 149 // This list keeps the order of window focusing for this screen
155 // Screen global so it works for sticky windows too. 150 // Screen global so it works for sticky windows too.
156 Focusables m_focused_list; 151 FocusableList m_focused_list;
157 Focusables m_creation_order_list; 152 FocusableList m_creation_order_list;
158 Focusables m_focused_win_list; 153 FocusableList m_focused_win_list;
159 Focusables m_creation_order_win_list; 154 FocusableList m_creation_order_win_list;
160 155
161 Focusables::const_iterator m_cycling_window; 156 Focusables::const_iterator m_cycling_window;
162 const Focusables *m_cycling_list; 157 const FocusableList *m_cycling_list;
163 Focusable *m_was_iconic; 158 Focusable *m_was_iconic;
164 WinClient *m_cycling_last; 159 WinClient *m_cycling_last;
165 160