Nemiver  0.3
nmv-i-perspective.h
Go to the documentation of this file.
1 // Author: Dodji Seketeli
2 /*
3  *This file is part of the Nemiver project
4  *
5  *Nemiver is free software; you can redistribute
6  *it and/or modify it under the terms of
7  *the GNU General Public License as published by the
8  *Free Software Foundation; either version 2,
9  *or (at your option) any later version.
10  *
11  *Nemiver is distributed in the hope that it will
12  *be useful, but WITHOUT ANY WARRANTY;
13  *without even the implied warranty of
14  *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15  *See the GNU General Public License for more details.
16  *
17  *You should have received a copy of the
18  *GNU General Public License along with Nemiver;
19  *see the file COPYING.
20  *If not, write to the Free Software Foundation,
21  *Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22  *
23  *See COPYRIGHT file copyright information.
24  */
25 #ifndef __NMV_I_PERSPECTIVE_H__
26 #define __NMV_I_PERSPECTIVE_H__
27 
28 #include <gtkmm.h>
29 #include <list>
30 #include "common/nmv-api-macros.h"
31 #include "common/nmv-plugin.h"
32 #include "nmv-i-workbench.h"
33 
34 NEMIVER_BEGIN_NAMESPACE (nemiver)
35 
37 using std::list;
43 
45 
47 
55  //non copyable
56  IPerspective (const IPerspective&);
57  IPerspective& operator= (const IPerspective&);
58  IPerspective ();
59 
60 protected:
62  Plugin::EntryPoint (a_dynmod)
63  {
64  }
65 
66 public:
67 
72  virtual void do_init (IWorkbench *a_workbench) = 0;
73 
77  virtual const UString& get_perspective_identifier () = 0;
78 
84  virtual void get_toolbars (list<Gtk::Widget*> &a_tbs) = 0;
85 
87  virtual Gtk::Widget* get_body () = 0;
88 
90  virtual IWorkbench& get_workbench () = 0;
91 
95  virtual void edit_workbench_menu () = 0;
96 
101  virtual bool open_file (const UString &a_uri, int a_cur_line=-1) = 0;
102 
107  virtual void open_file () = 0;
108 
110  virtual void close_current_file () = 0;
111 
114  virtual void close_file (const UString &a_uri) = 0;
115 
121  virtual Gtk::Widget* load_menu (const UString &a_filename,
122  const UString &a_widget_name) = 0;
123 
133  virtual bool agree_to_shutdown () = 0;
134 
136 
138 
141  virtual sigc::signal<void, bool>& activated_signal () = 0;
142 
145  virtual sigc::signal<void>& layout_changed_signal () = 0;
146 
148 
149 };//end class IPerspective
150 
151 NEMIVER_END_NAMESPACE (nemiver)
152 
153 #endif //__NMV_I_PERSPECTIVE_H__
154 
nemiver::IPerspectiveSafePtr
SafePtr< IPerspective, ObjectRef, ObjectUnref > IPerspectiveSafePtr
Definition: nmv-i-perspective.h:44
nemiver
Definition: nmv-address.h:31
nemiver::common::ObjectRef
Definition: nmv-safe-ptr-utils.h:45
nemiver::IWorkbench
the interface of the Workbench. The workbench is what you see graphically when you use Nemiver....
Definition: nmv-i-workbench.h:93
NEMIVER_API
#define NEMIVER_API
Definition: nmv-api-macros.h:53
nmv-api-macros.h
nemiver::common::DynamicModule
The base class for loadable modules.
Definition: nmv-dynamic-module.h:76
nemiver::common::UString
Definition: nmv-ustring.h:45
nemiver::common::Plugin::EntryPoint
Definition: nmv-plugin.h:147
nemiver::IPerspective::IPerspective
IPerspective(DynamicModule *a_dynmod)
Definition: nmv-i-perspective.h:61
nemiver::IWorkbenchSafePtr
SafePtr< IWorkbench, ObjectRef, ObjectUnref > IWorkbenchSafePtr
Definition: nmv-i-workbench.h:70
nemiver::common::ObjectUnref
Definition: nmv-safe-ptr-utils.h:55
nemiver::IPerspective
Definition: nmv-i-perspective.h:54
nmv-plugin.h
nemiver::common::SafePtr
Definition: nmv-safe-ptr.h:71
nemiver::common::env::do_init
void do_init()
nemiver::common::Plugin
Definition: nmv-plugin.h:52
nmv-i-workbench.h