Minsky
noteBase.h
Go to the documentation of this file.
1 /*
2  @copyright Steve Keen 2015
3  @author Russell Standish
4  This file is part of Minsky.
5 
6  Minsky is free software: you can redistribute it and/or modify it
7  under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Minsky is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Minsky. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef NOTEBASE_H
21 #define NOTEBASE_H
22 
23 #include "classdesc_access.h"
24 #include <string>
25 
26 namespace minsky
27 {
28  class NoteBase
29  {
30  public:
31  mutable bool mouseFocus=false;
32  bool selected=false;
33  bool bookmark=false;
34  virtual std::string const& detailedText() const {return m_detailedText;}
35  virtual std::string const& detailedText(const std::string& x) {return m_detailedText=x;}
36  virtual std::string const& tooltip() const {return m_tooltip;}
37  virtual std::string const& tooltip(const std::string& x) {return m_tooltip=x;}
39  virtual void adjustBookmark() const {}
40  virtual void updateBoundingBox() {}
41  virtual ~NoteBase()=default;
42  private:
44  std::string m_detailedText, m_tooltip;
45  };
46 }
47 
48 #include "noteBase.cd"
49 #endif
CLASSDESC_ACCESS(NoteBase)
virtual std::string const & tooltip() const
Definition: noteBase.h:36
std::string m_detailedText
Definition: noteBase.h:44
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky&#39;s state cha...
Definition: constMap.h:22
virtual void updateBoundingBox()
Definition: noteBase.h:40
bool bookmark
Is this item also a bookmark?
Definition: noteBase.h:33
virtual void adjustBookmark() const
adjust bookmark list to reflect current configuration
Definition: noteBase.h:39
bool selected
true if selected for cut, copy or group operation
Definition: noteBase.h:32
virtual std::string const & detailedText(const std::string &x)
Definition: noteBase.h:35
virtual ~NoteBase()=default
bool mouseFocus
true if target of a mouseover
Definition: noteBase.h:31
std::string m_tooltip
Definition: noteBase.h:44
virtual std::string const & tooltip(const std::string &x)
Definition: noteBase.h:37
virtual std::string const & detailedText() const
Definition: noteBase.h:34