aboutsummaryrefslogtreecommitdiff
path: root/src/Window.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-01-07 01:34:49 (GMT)
committerfluxgen <fluxgen>2003-01-07 01:34:49 (GMT)
commit3889975c4fbdf5724b6626930154cd1011c07b7d (patch)
tree5e4f7db9cf06b958ebd4db43a57134152b3e9181 /src/Window.hh
parent06f63eec84fa37e0832fee0432cd398f55f7aeba (diff)
downloadfluxbox-3889975c4fbdf5724b6626930154cd1011c07b7d.zip
fluxbox-3889975c4fbdf5724b6626930154cd1011c07b7d.tar.bz2
fixed Windowmenu to FbTk Menu and added last know button pos and popupMenu function on last known position
Diffstat (limited to 'src/Window.hh')
-rw-r--r--src/Window.hh24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/Window.hh b/src/Window.hh
index 65cc2e6..65a02ce 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -22,14 +22,14 @@
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: Window.hh,v 1.40 2003/01/05 22:20:46 fluxgen Exp $ 25// $Id: Window.hh,v 1.41 2003/01/07 01:33:18 fluxgen Exp $
26 26
27#ifndef WINDOW_HH 27#ifndef WINDOW_HH
28#define WINDOW_HH 28#define WINDOW_HH
29 29
30#include "BaseDisplay.hh" 30#include "BaseDisplay.hh"
31#include "Timer.hh" 31#include "Timer.hh"
32#include "Windowmenu.hh" 32#include "Menu.hh"
33#include "Subject.hh" 33#include "Subject.hh"
34#include "FbWinFrame.hh" 34#include "FbWinFrame.hh"
35#include "EventHandler.hh" 35#include "EventHandler.hh"
@@ -49,7 +49,11 @@
49 49
50class Tab; 50class Tab;
51class FbWinFrameTheme; 51class FbWinFrameTheme;
52class BScreen;
52 53
54namespace FbTk {
55class MenuTheme;
56};
53 57
54/// Creates the window frame and handles any window event for it 58/// Creates the window frame and handles any window event for it
55class FluxboxWindow : public TimeoutHandler, public FbTk::EventHandler { 59class FluxboxWindow : public TimeoutHandler, public FbTk::EventHandler {
@@ -98,7 +102,8 @@ public:
98 }; 102 };
99 103
100 /// create fluxbox window with parent win and screen connection 104 /// create fluxbox window with parent win and screen connection
101 FluxboxWindow(Window win, BScreen *scr, int screen_num, BImageControl &imgctrl, FbWinFrameTheme &tm); 105 FluxboxWindow(Window win, BScreen *scr, int screen_num, BImageControl &imgctrl, FbWinFrameTheme &tm,
106 FbTk::MenuTheme &menutheme);
102 virtual ~FluxboxWindow(); 107 virtual ~FluxboxWindow();
103 108
104 109
@@ -140,7 +145,10 @@ public:
140 void setWorkspace(int n); 145 void setWorkspace(int n);
141 void changeBlackboxHints(const BaseDisplay::BlackboxHints &bh); 146 void changeBlackboxHints(const BaseDisplay::BlackboxHints &bh);
142 void restoreAttributes(); 147 void restoreAttributes();
143 void showMenu(int mx, int my); 148 void showMenu(int mx, int my);
149 // popup menu on last button press position
150 void popupMenu();
151
144 void pauseMoving(); 152 void pauseMoving();
145 void resumeMoving(); 153 void resumeMoving();
146 /** 154 /**
@@ -207,8 +215,8 @@ public:
207 Window getFrameWindow() const { return m_frame.window().window(); } 215 Window getFrameWindow() const { return m_frame.window().window(); }
208 Window getClientWindow() const { return client.window; } 216 Window getClientWindow() const { return client.window; }
209 217
210 Windowmenu *getWindowmenu() { return m_windowmenu.get(); } 218 FbTk::Menu &getWindowmenu() { return m_windowmenu; }
211 const Windowmenu *getWindowmenu() const { return m_windowmenu.get(); } 219 const FbTk::Menu &getWindowmenu() const { return m_windowmenu; }
212 220
213 const std::string &getTitle() const { return client.title; } 221 const std::string &getTitle() const { return client.title; }
214 const std::string &getIconTitle() const { return client.icon_title; } 222 const std::string &getIconTitle() const { return client.icon_title; }
@@ -320,7 +328,7 @@ private:
320 BaseDisplay::BlackboxAttributes blackbox_attrib; 328 BaseDisplay::BlackboxAttributes blackbox_attrib;
321 329
322 Time lastButtonPressTime; 330 Time lastButtonPressTime;
323 std::auto_ptr<Windowmenu> m_windowmenu; 331 FbTk::Menu m_windowmenu;
324 332
325 timeval lastFocusTime; 333 timeval lastFocusTime;
326 334
@@ -370,6 +378,8 @@ private:
370 int frame_resize_y, frame_resize_h; 378 int frame_resize_y, frame_resize_h;
371 int m_old_pos_x, m_old_pos_y; ///< old position so we can restore from maximized 379 int m_old_pos_x, m_old_pos_y; ///< old position so we can restore from maximized
372 unsigned int m_old_width, m_old_height; ///< old size so we can restore from maximized state 380 unsigned int m_old_width, m_old_height; ///< old size so we can restore from maximized state
381 int m_last_button_x, ///< last known x position of the mouse button
382 m_last_button_y; ///< last known y position of the mouse button
373 FbWinFrame m_frame; 383 FbWinFrame m_frame;
374 384
375 enum { F_NOINPUT = 0, F_PASSIVE, F_LOCALLYACTIVE, F_GLOBALLYACTIVE }; 385 enum { F_NOINPUT = 0, F_PASSIVE, F_LOCALLYACTIVE, F_GLOBALLYACTIVE };