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.
Change in Boron-20100401: new way of handling the menu and the toolbar
Consult the Plugin Development Guide for additional details.

Main Components

method toplevel : main_window_extension_points
The whole GUI aka self
method menu_manager : unit -> Menu_manager.menu_manager
The object managing the menubar and the toolbar.
Since Boron-20100401
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 main_window : GWindow.window
The main window
method annot_window : GText.view
The information panel. The text is automatically cleared whenever the selection is changed. You should not directly use the buffer contained in the annot_window to add text. Use the method pretty_information.
method pretty_information : 'a. ('a, Format.formatter, unit) Pervasives.format -> 'a
Pretty print a message in the annot_window.
method lower_notebook : GPack.notebook
The lower notebook with messages tabs

Source viewer

method source_viewer : GSourceView2.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 reactive_buffer : reactive_buffer option
The buffer containing the AST.
Since Carbon-20101201

Original source viewer

method original_source_viewer : Source_manager.t
The multi-tab source file display widget.
method view_stmt : Cil_types.stmt -> unit
Display the given stmt in the source_viewer and in the original_source_viewer
Since Carbon-20101201
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

Dialog Boxes

method launcher : unit -> unit
Display the analysis configuration dialog and offer the opportunity to launch to the user
method error : 'b.
?parent:GWindow.window_skel ->
('b, Format.formatter, unit) Pervasives.format -> 'b
Popup a modal dialog displaying an error message

Extension Points

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.
method register_source_highlighter : (GSourceView2.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.
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.

General features

method reset : unit -> unit
Reset the GUI and its extensions to its initial state
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.
method protect : cancelable:bool -> ?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.

Set cancelable to true if the protected action should be cancellable by the user through button `Stop'.

method full_protect : 'c.
cancelable:bool -> ?parent:GWindow.window_skel -> (unit -> 'c) -> 'c 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.

Set cancelable to true if the protected action should be cancellable by the user through button `Stop'.

method push_info : 'd. ('d, Format.formatter, unit) Pervasives.format -> 'd
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 : 'e 'f.
(< event : GObj.event_ops; .. > as 'e) ->
('f, Format.formatter, unit) Pervasives.format -> 'f
Help message displayed when entering the widget