Plugin Functions

All functions takes a CssedPlugin pointer as parameter and all actions take place in the currently opened document.

Follow the links above for a complete description of each function, or view plugin.h for a complete listing.

Bellow each functions there's a link to a code sample.

User Interface Functions

Those functions are used to add interface elements to cssed, but cssed_plugin_unload_callback that's provided as a convenience callback to unload the plugin. This is provided because to use an unload callback into a plugin can cause segmentation faults as - once unloaded the plugin - the callback address will be invalid.

cssed_plugin_unload_callback
[view example]

cssed_add_menu_item_to_plugins_menu
[view example]

cssed_plugin_add_widget_to_toolbar
[view example]

cssed_plugin_add_page_with_widget_to_footer
[view example]

cssed_plugin_remove_page_with_widget_in_footer
[view example]

cssed_plugin_add_page_with_widget_to_sidebar
[view example]

cssed_plugin_remove_page_with_widget_in_sidebar
[view example]

Plugin document actions

All those functions perform their actions in the currently opened document.

cssed_plugin_add_text_to_document
[view example]

cssed_plugin_get_position_at_line
[view example]

cssed_plugin_undo_document_action
[view example]

cssed_plugin_redo_document_action
[view example]

cssed_plugin_search_prev
[view example]

cssed_plugin_search_next
[view example]

Cut and Paste

Common basic text operations. Those performs the same operations as the cut, copy and paste menus, or toolbar buttons.

cssed_plugin_cut
[view example]

cssed_plugin_copy
cssed_plugin_copy cssed_plugin_cut "[view example]"

cssed_plugin_paste
[view example]

Selection and Information

Select and unselect chunks of text, or get information about the text on current document.

cssed_plugin_get_selection_end
[view example]

cssed_plugin_get_selection_start
[view example]

cssed_plugin_set_selection_start
[view example]

cssed_plugin_set_selection_end
[view example]

cssed_plugin_set_selection_range
[view example]

cssed_plugin_replace_sel
[view example]

cssed_plugin_clear_sel
[view example]

cssed_plugin_get_length
[view example]

Markers and Bookmarks

Markers and Bookmarks are mechanisms for the user or the programmer to flag a given line - or a set of lines - visually with an icon on the right glutter on the editor window. There're also provided some functions to easily move from one of them to the next or previous one.

The only difference among them is that bookmarks are meant to be managed by the user, and marker are meant to be managed by the programmer.

cssed_plugin_bookmark_next
[view example]

cssed_plugin_bookmark_prev
[view example]

cssed_plugin_set_bookmark_at_line
[view example]

cssed_plugin_is_bookmark_set_at_line
[view example]

cssed_plugin_marker_next
[view example]

cssed_plugin_marker_prev
[view example]

cssed_plugin_set_marker_at_line
[view example]

cssed_plugin_is_marker_set_at_line
[view example]

Dialog Functions

Those functions provide generic dialogs to be used by application writers. There's no advantage - but simplicity - to use those dialogs over custom ones.

cssed_plugin_error_message
[view example]

cssed_plugin_confirm_dialog
[view example]

File Functions

Those functions open files on cssed.

cssed_plugin_open_file
[view example]

cssed_plugin_open_file_with_fileselector
[view example]

The output window

The output window is located at the footer panel on cssed, and is used to send non-fatal messages and information to the user.

cssed_plugin_output_write
[view example]

cssed_plugin_output_clear
[view example]

The output window

Those functions retrieves or set the current caret position or line. Both caret and line values are 0 based indexes so the first line is number 0 and the first character is number 0 as well.

cssed_plugin_get_line_from_position
[view example]

cssed_plugin_get_position_from_line
[view example]

cssed_plugin_get_current_position
[view example]

cssed_plugin_set_current_position
[view example]

cssed_plugin_set_current_line
[view example]

cssed_plugin_get_current_line
[view example]

cssed_plugin_get_line_end_from_position
[view example]

Auto-completion and User lists

Auto-completion and User lists, are pop windows that helps the user to select some text to be added to current document.

The main difference among them is aut-completion lists are updated while the user type to show the best match on the list.

cssed_plugin_show_user_list
[view example]

cssed_plugin_show_autocompletion_list
[view example]

cssed_plugin_autocompletion_cancel
[view example]

cssed_plugin_is_autocompletion_active
[view example]

cssed_plugin_autocompletion_select
[view example]

Call tips

Call tips are small windows with information about a function signature or the value of a variable on a debugger. Call tips are hidden by some text insertion actions if they're incompatible with the calltip.

cssed_plugin_show_calltip
[view example]

cssed_plugin_cancel_calltip
[view example]

cssed_plugin_calltipactive
[view example]

cssed_plugin_calltiposstart
[view example]

[ Previous | Main Page | Next ]


Back to Index

This documentation is © Iago Rubio Sanfiz, 2004