PieDock  1.6.3
PieMenuWindow.h
1 /*
2  * O ,-
3  * o . - ' ,-
4  * . ` . ,
5  * ( )) . (
6  * `-;_ . - `.`.
7  * `._'
8  *
9  * Copyright (c) 2007-2010 Markus Fisch <mf@markusfisch.de>
10  *
11  * Licensed under the MIT license:
12  * http://www.opensource.org/licenses/mit-license.php
13  */
14 #ifndef _PieDock_PieMenuWindow_
15 #define _PieDock_PieMenuWindow_
16 
17 #include "TransparentWindow.h"
18 #include "PieMenu.h"
19 #include "Text.h"
20 #include "Cartouche.h"
21 
22 #include <time.h>
23 
24 namespace PieDock
25 {
32  {
33  public:
34  enum Placement
35  {
36  AroundCursor,
37  IconBelowCursor
38  };
39 
41  virtual ~PieMenuWindow();
42  bool appear( std::string = "", Placement = AroundCursor );
43  void draw();
44  bool processEvent( XEvent & );
45 
46  protected:
47  typedef std::map<int, Cartouche *> CartoucheMap;
48 
49  virtual void show( Placement = AroundCursor );
50  virtual void hide();
51  virtual void updateWithText();
52  virtual bool performAction( Settings::Action );
53  virtual void place( Placement );
54 
55  private:
56  static const std::string ShowMessage;
57  PieMenu menu;
58  Pixmap textCanvas;
59  Text *text;
60  CartoucheMap cartoucheMap;
61  };
62 }
63 
64 #endif