PieDock  1.6.3
MenuItem.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_MenuItem_
15 #define _PieDock_MenuItem_
16 
17 #include "WindowStack.h"
18 #include "Icon.h"
19 
20 namespace PieDock
21 {
27  class MenuItem : public WindowStack
28  {
29  public:
30  MenuItem( std::string, std::string, bool = true );
31  MenuItem( Icon * );
32  virtual ~MenuItem() {}
33  virtual inline const std::string &getTitle() const {
34  return title; }
35  virtual inline void setTitle( std::string t ) { title = t; }
36  virtual inline const std::string &getCommand() const {
37  return command; }
38  virtual inline void setCommand( std::string c ) { command = c; }
39  virtual inline Icon *getIcon() const { return icon; }
40  virtual inline void setIcon( Icon *i ) { icon = i; }
41  virtual inline const bool isSticky() const { return sticky; }
42  virtual inline void makeSticky() { sticky = true; }
43 
44  private:
45  std::string title;
46  std::string command;
47  Icon *icon;
48  bool sticky;
49  };
50 }
51 
52 #endif