PieDock  1.6.3
MenuItemWithWorkspaces.h
1 /*
2  * O ,-
3  * ° o . -´ ' ,-
4  * ° .´ ` . ´,´
5  * ( ° )) . (
6  * `-;_ . -´ `.`.
7  * `._' ´
8  *
9  * Copyright (c) 2007-2012 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_MenuItemWithWorkspaces_
15 #define _PieDock_MenuItemWithWorkspaces_
16 
17 #include "MenuItem.h"
18 #include "WorkspaceLayout.h"
19 
20 namespace PieDock
21 {
28  {
29  public:
31  virtual ~MenuItemWithWorkspaces();
32  virtual inline Icon *getIcon() const {
33  return useWorkspaceIcon ?
34  workspaceIcon :
35  MenuItem::getIcon(); }
36  virtual void showWorkspace( WorkspaceLayout *, unsigned int,
37  unsigned int );
38 
39  protected:
40  virtual void freeWorkspaceIcon();
41 
42  private:
43  typedef struct
44  {
45  int x;
46  int y;
47  int width;
48  int height;
49  } Geometry;
50 
51  Icon *workspaceIcon;
52  bool useWorkspaceIcon;
53  Geometry cachedGeometry;
54  };
55 }
56 
57 #endif