Class type Design.main_window_extension_points


class type main_window_extension_points = object .. end
This is the type of extension points for the GUI.
Consult the Plugin Development Guide for additional details.
method ui_manager : GAction.ui_manager
Use this to add menu entries. The default layout to enhance is "<ui> <menubar name='MenuBar'> <menu action='FileMenu'></menu> <menu action='ViewMenu'></menu> </menubar>

<toolbar name='ToolBar'> <toolitem action='Load'/> <toolitem action='Quit'/> </toolbar>

<popup name='Contextual'> </popup>

</ui>"

Here is an example to add a menu entry "Dummy Entry" under the File menu in object o: (* First create the action associated to the entry ... *) GAction.add_action "DummyAction" ~label:"Dumm_y Entry" ?stock ?tooltip ?accel ?callback o#actions; (* ... and merge the menu entries at the right location *) ui_manager#add_ui_from_string "<ui><menubar name='MenuBar'> <menu name='FileMenu'> <menuitem action='DummyAction'/> </menu> </menubar></ui>"

method actions : GAction.action_group
method file_tree : Filetree.t
The tree containing the list of files and functions
method file_tree_view : GTree.view
The tree view containing the list of files and functions
method toplevel : main_window_extension_points
The whole GUI aka self
method main_window : GWindow.window
The main window
method annot_window : GText.view
The information pannel. The text is cleared whenever the selection is changed.
method source_viewer : GSourceView.source_view
The GText.view showing the AST.
Consult the Plugin Development Guide for additional details.
method display_globals : Cil_types.global list -> unit
Display globals in the general source_view.
method lower_notebook : GPack.notebook
The lower notebook with messages tabs
method register_source_selector : (GMenu.menu GMenu.factory ->
main_window_extension_points ->
button:int -> Pretty_source.localizable -> unit) ->
unit
register an action to perform when button is released on a given localizable. If the button 3 is released, the first argument is popped as a contextual menu.
Consult the Plugin Development Guide for additional details.
method register_source_highlighter : (GSourceView.source_buffer ->
Pretty_source.localizable -> start:int -> stop:int -> unit) ->
unit
register an highlighting function to run on a given localizable between start and stop in the given buffer. Priority of Gtext.tags is used to decide which tag is rendered on top of the other.
Consult the Plugin Development Guide for additional details.
method register_panel : (main_window_extension_points ->
string * GObj.widget * (unit -> unit) option) ->
unit
register_panel f registers a panel in GUI. f self returns the name of the panel to create, the widget containing the panel and a function to be called on refresh.
method rehighlight : unit -> unit
Force to rehilight the current displayed buffer. Plugins should call this method whenever they have changed the states on which the function given to register_source_highlighter have been updated.
method scroll : Pretty_source.localizable -> unit
Scroll to the given localizable in the current buffer if possible.

The original source viewer

method original_source_viewer : Source_manager.t
The multi-tab source file display widget.
method view_original : Cil_types.location -> unit
Display the given location in the original_source_viewer
method view_original_stmt : Cil_types.stmt -> Cil_types.location
Display the given stmt in the original_source_viewer
method view_original : Cil_types.location -> unit
Display the given location in the original_source_viewer

General features

method launcher : unit -> unit
Display the analysis configuration dialog and offer the opportunity to launch to the user
method reset : unit -> unit
reset the GUI and its extensions to its initial state
method error : 'a.
?parent:GWindow.window_skel ->
('a, Format.formatter, unit) Pervasives.format -> 'a
Popup a modal dialog displaying an error message
method protect : ?parent:GWindow.window_skel -> (unit -> unit) -> unit
Lock the GUI ; run the funtion ; catch all exceptions ; Unlock GUI The parent window must be set if this method is not called directly by the main window: it will ensure that error dialogs are transient for the right window.
method full_protect : 'b. ?parent:GWindow.window_skel -> (unit -> 'b) -> 'b option
Lock the GUI ; run the funtion ; catch all exceptions ; Unlock GUI ; returns f (). The parent window must be set if this method is not called directly by the main window: it will ensure that error dialogs are transient for the right window.
method push_info : 'c. ('c, Format.formatter, unit) Pervasives.format -> 'c
Pretty print a temporary information in the status bar
method pop_info : unit -> unit
Remove last temporary information in the status bar
method help_message : 'd 'e.
(< event : GObj.event_ops; .. > as 'd) ->
('e, Format.formatter, unit) Pervasives.format -> 'e
Help message displayed when entering the widget