Nemiver  0.3
Public Member Functions | Protected Member Functions | List of all members
nemiver::IPerspective Class Referenceabstract

#include <nmv-i-perspective.h>

Inheritance diagram for nemiver::IPerspective:
nemiver::common::Plugin::EntryPoint nemiver::common::DynModIface nemiver::common::Object nemiver::IDBGPerspective

Public Member Functions

virtual void do_init (IWorkbench *a_workbench)=0
 
virtual const UStringget_perspective_identifier ()=0
 
virtual void get_toolbars (list< Gtk::Widget * > &a_tbs)=0
 
virtual Gtk::Widget * get_body ()=0
 
virtual IWorkbenchget_workbench ()=0
 
virtual void edit_workbench_menu ()=0
 
virtual bool open_file (const UString &a_uri, int a_cur_line=-1)=0
 open a source file from a url More...
 
virtual void open_file ()=0
 open a source file More...
 
virtual void close_current_file ()=0
 close the currently selected file More...
 
virtual void close_file (const UString &a_uri)=0
 closes a file More...
 
virtual Gtk::Widget * load_menu (const UString &a_filename, const UString &a_widget_name)=0
 load a menu file More...
 
virtual bool agree_to_shutdown ()=0
 Should return true to allow shutdown. This Method will be called for each perspective before workbench initiates a shutdown (). This is a chance given to the perspective to veto the shutdown (). Each perspective has to implement this function wherein it can decide for itself whether it wants to veto the shutdown or not. Returning 'true' from here means that the perspective is ok with the shutdown returning 'false' vetoes the shutdown and nemiver does not go down. More...
 
signals
virtual sigc::signal< void, bool > & activated_signal ()=0
 
virtual sigc::signal< void > & layout_changed_signal ()=0
 
- Public Member Functions inherited from nemiver::common::Plugin::EntryPoint
bool build_absolute_resource_path (const UString &a_relative_path, std::string &a_absolute_path)
 
const UStringplugin_path ()
 
virtual ~EntryPoint ()
 
DescriptorSafePtr descriptor ()
 
- Public Member Functions inherited from nemiver::common::DynModIface
 DynModIface (DynamicModuleSafePtr &a_dynmod)
 
 DynModIface (DynamicModule *a_dynmod)
 
DynamicModuleget_dynamic_module () const
 
- Public Member Functions inherited from nemiver::common::Object
 Object ()
 
 Object (Object const &)
 
Objectoperator= (Object const &)
 
virtual ~Object ()
 
void ref ()
 
void unref ()
 
void enable_refcount (bool a_enabled=true)
 
bool is_refcount_enabled () const
 
long get_refcount () const
 
void attach_object (const UString &a_key, const Object *a_object)
 
bool get_attached_object (const UString &a_key, const Object *&a_object)
 

Protected Member Functions

 IPerspective (DynamicModule *a_dynmod)
 
- Protected Member Functions inherited from nemiver::common::Plugin::EntryPoint
Plugin::EntryPoint::LoaderSafePtr plugin_entry_point_loader ()
 
void plugin_entry_point_loader (Plugin::EntryPoint::LoaderSafePtr &)
 
 EntryPoint (DynamicModuleSafePtr &a_module)
 
 EntryPoint (DynamicModule *a_module)
 
virtual void activate (bool a_activate, ObjectSafePtr &a_activation_context)
 
virtual bool is_activated ()
 
void descriptor (DescriptorSafePtr &a_desc)
 

Additional Inherited Members

- Public Types inherited from nemiver::common::Plugin::EntryPoint
typedef SafePtr< Loader, ObjectRef, ObjectUnrefLoaderSafePtr
 
- Protected Attributes inherited from nemiver::common::Object
SafePtr< ObjectPrivm_priv
 

Detailed Description

an abstraction of a consistent user interface dedicated at doing a certain task. Nemiver is a collection of perspectives even though only on perspective is coded at the moment: 'the debugger perspective' Perspective are also plugins. It is the dutty of the Workbench to load all the perspective it finds, at launch time.

Constructor & Destructor Documentation

◆ IPerspective()

nemiver::IPerspective::IPerspective ( DynamicModule a_dynmod)
inlineprotected

Member Function Documentation

◆ activated_signal()

virtual sigc::signal<void, bool>& nemiver::IPerspective::activated_signal ( )
pure virtual

This signal is emited to notify the perspective about its activation state (whether it is activated or not).

Implemented in nemiver::IDBGPerspective.

◆ agree_to_shutdown()

virtual bool nemiver::IPerspective::agree_to_shutdown ( )
pure virtual

Should return true to allow shutdown. This Method will be called for each perspective before workbench initiates a shutdown (). This is a chance given to the perspective to veto the shutdown (). Each perspective has to implement this function wherein it can decide for itself whether it wants to veto the shutdown or not. Returning 'true' from here means that the perspective is ok with the shutdown returning 'false' vetoes the shutdown and nemiver does not go down.

Implemented in nemiver::IDBGPerspective.

◆ close_current_file()

virtual void nemiver::IPerspective::close_current_file ( )
pure virtual

close the currently selected file

Implemented in nemiver::IDBGPerspective.

◆ close_file()

virtual void nemiver::IPerspective::close_file ( const UString a_uri)
pure virtual

closes a file

Parameters
a_urithe uri that identifies the file to close

Implemented in nemiver::IDBGPerspective.

◆ do_init()

virtual void nemiver::IPerspective::do_init ( IWorkbench a_workbench)
pure virtual

initialize the perspective within the context of of the workbench that loads it.

Parameters
a_workbench,theworkbench that loaded the current perspective.

Implemented in nemiver::IDBGPerspective.

◆ edit_workbench_menu()

virtual void nemiver::IPerspective::edit_workbench_menu ( )
pure virtual

This method is only called once, during the perspective's initialisation time, by the workbench.

Implemented in nemiver::IDBGPerspective.

◆ get_body()

virtual Gtk::Widget* nemiver::IPerspective::get_body ( )
pure virtual
Returns
the body of the perspective.

Implemented in nemiver::IDBGPerspective.

◆ get_perspective_identifier()

virtual const UString& nemiver::IPerspective::get_perspective_identifier ( )
pure virtual

Get a unique identifier of the perspective. It is a good practice that this remains legible.

Returns
the unique identifier of the of the perspective.

Implemented in nemiver::IDBGPerspective.

◆ get_toolbars()

virtual void nemiver::IPerspective::get_toolbars ( list< Gtk::Widget * > &  a_tbs)
pure virtual

this method is called by the Workbench when the perspective is first set in it. \params a_tbs the list of toolbars. The implementation of this method must fill this parameter with the list of toolbars it wants the workbench to display when this perspective becomes active.

Implemented in nemiver::IDBGPerspective.

◆ get_workbench()

virtual IWorkbench& nemiver::IPerspective::get_workbench ( )
pure virtual
Returns
the workbench associated to this perspective

Implemented in nemiver::IDBGPerspective.

◆ layout_changed_signal()

virtual sigc::signal<void>& nemiver::IPerspective::layout_changed_signal ( )
pure virtual

This signal is emited to notify the workbench when the layout of the perspective changes.

Implemented in nemiver::IDBGPerspective.

◆ load_menu()

virtual Gtk::Widget* nemiver::IPerspective::load_menu ( const UString a_filename,
const UString a_widget_name 
)
pure virtual

load a menu file

Parameters
a_filenamethe file name of the menu file. It's relative to the "menus" subdirectory of the perspective
a_widget_namethe name of the widget to return as the root of the menu.

Implemented in nemiver::IDBGPerspective.

◆ open_file() [1/2]

virtual void nemiver::IPerspective::open_file ( )
pure virtual

open a source file

Let the user choose the set of files to open via a file chooser dialog and open them.

Implemented in nemiver::IDBGPerspective.

◆ open_file() [2/2]

virtual bool nemiver::IPerspective::open_file ( const UString a_uri,
int  a_cur_line = -1 
)
pure virtual

open a source file from a url

Parameters
a_urithe uri of the file to open
a_cur_linethe line to flag as being the current exceution line if set to -1, this parameter is ignored.

Implemented in nemiver::IDBGPerspective.


The documentation for this class was generated from the following file: