MySQL Workbench  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
dockingpoint.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; version 2 of the
7  * License.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
17  * 02110-1301 USA
18  */
19 
20 #ifndef _MFORMS_DOCKINGPOINT_H_
21 #define _MFORMS_DOCKINGPOINT_H_
22 
23 #include <map>
24 
25 #include "mforms/base.h"
26 #include "base/geometry.h"
27 #include "base/drawing.h"
28 
29 namespace mforms {
30 
31  class AppView;
32  class DockingPoint;
33 
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 #ifndef SWIG
36  class MFORMS_EXPORT DockingPointDelegate
37  {
38  friend class DockingPoint;
39  protected:
40  DockingPoint *_dpoint;
41  public:
42  virtual ~DockingPointDelegate() {};
43 
44  virtual std::string get_type() = 0;
45  virtual void dock_view(AppView *view, const std::string &arg1, int arg2) = 0;
46  virtual bool select_view(AppView *view) = 0;
47  virtual void undock_view(AppView *view) = 0;
48  virtual void set_view_title(AppView *view, const std::string &title) = 0;
49  virtual std::pair<int, int> get_size() = 0;
50  };
51 #endif
52 #endif
53 
59  class MFORMS_EXPORT DockingPoint : public Object
60  {
61  protected:
63  public:
64 #ifndef SWIG
65  DockingPoint(DockingPointDelegate *delegate, bool delete_on_destroy);
66 #endif
67  public:
68  ~DockingPoint();
69 
70 // std::string get_name();
71  std::string get_type();
72 
81  void dock_view(AppView *view, const std::string &arg1 = "", int arg2 = 0);
82 
88  bool select_view(AppView *view);
89 
92  void undock_view(AppView *view);
93 
95  bool close_view(AppView *view);
96 
101  void set_view_title(AppView *view, const std::string &title);
102 
104  std::pair<int, int> get_size();
105 
106 #ifndef SWIG
107  DockingPointDelegate *get_delegate() { return _delegate; }
108 #endif
109  protected:
110  DockingPointDelegate *_delegate;
112  };
113 };
114 
115 #endif
A view that is dockable into the host application window.
Definition: appview.h:53
DockingPointDelegate * _delegate
Definition: dockingpoint.h:110
#define MFORMS_EXPORT
Definition: base.h:33
Proxy class for interfacing with host application windows.
Definition: dockingpoint.h:59
DockingPointDelegate * get_delegate()
Definition: dockingpoint.h:107
MySQL Workbench 6.1 documentation