diff options
Diffstat (limited to 'src/Toolbar.hh')
-rw-r--r-- | src/Toolbar.hh | 64 |
1 files changed, 5 insertions, 59 deletions
diff --git a/src/Toolbar.hh b/src/Toolbar.hh index b32aea1..bf93d44 100644 --- a/src/Toolbar.hh +++ b/src/Toolbar.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Toolbar.hh,v 1.19 2003/01/09 22:10:53 fluxgen Exp $ | 25 | // $Id: Toolbar.hh,v 1.20 2003/01/12 18:03:24 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef TOOLBAR_HH | 27 | #ifndef TOOLBAR_HH |
28 | #define TOOLBAR_HH | 28 | #define TOOLBAR_HH |
@@ -42,58 +42,6 @@ class Toolbar; | |||
42 | namespace FbTk { | 42 | namespace FbTk { |
43 | class ImageControl; | 43 | class ImageControl; |
44 | }; | 44 | }; |
45 | /** | ||
46 | Menu for toolbar. | ||
47 | @see Toolbar | ||
48 | */ | ||
49 | class Toolbarmenu:public Basemenu { | ||
50 | public: | ||
51 | explicit Toolbarmenu(Toolbar &tb); | ||
52 | ~Toolbarmenu(); | ||
53 | |||
54 | inline const Basemenu *headmenu() const { return m_headmenu.get(); } | ||
55 | |||
56 | inline Basemenu *placementmenu() { return &m_placementmenu; } | ||
57 | inline const Basemenu *placementmenu() const { return &m_placementmenu; } | ||
58 | |||
59 | void reconfigure(); | ||
60 | |||
61 | protected: | ||
62 | virtual void itemSelected(int button, unsigned int index); | ||
63 | virtual void internal_hide(); | ||
64 | |||
65 | private: | ||
66 | class Placementmenu : public Basemenu { | ||
67 | public: | ||
68 | Placementmenu(Toolbarmenu &tm); | ||
69 | protected: | ||
70 | virtual void itemSelected(int button, unsigned int index); | ||
71 | private: | ||
72 | Toolbarmenu &m_toolbarmenu; | ||
73 | }; | ||
74 | friend class Placementmenu; | ||
75 | |||
76 | class Headmenu : public Basemenu { | ||
77 | public: | ||
78 | Headmenu(Toolbarmenu &tm); | ||
79 | protected: | ||
80 | virtual void itemSelected(int button, unsigned int index); | ||
81 | private: | ||
82 | Toolbarmenu &m_toolbarmenu; | ||
83 | }; | ||
84 | std::auto_ptr<Headmenu> m_headmenu; | ||
85 | friend class Headmenu; | ||
86 | |||
87 | |||
88 | Toolbar &m_toolbar; | ||
89 | Placementmenu m_placementmenu; | ||
90 | |||
91 | |||
92 | friend class Toolbar; | ||
93 | |||
94 | }; | ||
95 | |||
96 | |||
97 | 45 | ||
98 | /// The toolbar. | 46 | /// The toolbar. |
99 | /** | 47 | /** |
@@ -122,7 +70,9 @@ public: | |||
122 | /// remove icon from iconbar | 70 | /// remove icon from iconbar |
123 | void delIcon(FluxboxWindow *w); | 71 | void delIcon(FluxboxWindow *w); |
124 | 72 | ||
125 | inline const Toolbarmenu &menu() const { return m_toolbarmenu; } | 73 | inline const FbTk::Menu &menu() const { return m_toolbarmenu; } |
74 | inline FbTk::Menu &menu() { return m_toolbarmenu; } | ||
75 | |||
126 | /// are we in workspacename editing? | 76 | /// are we in workspacename editing? |
127 | inline bool isEditing() const { return editing; } | 77 | inline bool isEditing() const { return editing; } |
128 | /// always on top? | 78 | /// always on top? |
@@ -200,7 +150,7 @@ private: | |||
200 | FbTk::ImageControl &image_ctrl; | 150 | FbTk::ImageControl &image_ctrl; |
201 | FbTk::Timer clock_timer; ///< timer to update clock | 151 | FbTk::Timer clock_timer; ///< timer to update clock |
202 | FbTk::Timer hide_timer; ///< timer to for auto hide toolbar | 152 | FbTk::Timer hide_timer; ///< timer to for auto hide toolbar |
203 | Toolbarmenu m_toolbarmenu; | 153 | FbTk::Menu m_toolbarmenu; |
204 | std::auto_ptr<IconBar> m_iconbar; | 154 | std::auto_ptr<IconBar> m_iconbar; |
205 | 155 | ||
206 | std::string new_workspace_name; ///< temp variable in edit workspace name mode | 156 | std::string new_workspace_name; ///< temp variable in edit workspace name mode |
@@ -209,10 +159,6 @@ private: | |||
209 | Placement m_place; | 159 | Placement m_place; |
210 | 160 | ||
211 | friend class HideHandler; | 161 | friend class HideHandler; |
212 | friend class Toolbarmenu; | ||
213 | friend class Toolbarmenu::Placementmenu; | ||
214 | |||
215 | friend class Toolbarmenu::Headmenu; | ||
216 | }; | 162 | }; |
217 | 163 | ||
218 | 164 | ||