gtksourceviewmm
2.10.3
|
The view object. More...
#include <gtksourceviewmm/sourceview.h>
Public Types | |
typedef sigc::slot < Glib::ustring, const Glib::RefPtr< SourceMark >& > | SlotMarkTooltip |
Slot holding a function. | |
Public Member Functions | |
GtkSourceView* | gobj () |
Provides access to the underlying C GtkObject. | |
const GtkSourceView* | gobj () const |
Provides access to the underlying C GtkObject. | |
SourceView () | |
Creates a new SourceView. | |
SourceView (const Glib::RefPtr< SourceBuffer >& buffer) | |
Creates a new SourceView widget displaying the buffer buffer. | |
Glib::RefPtr< const SourceBuffer > | get_source_buffer () const |
Returns the GtkTextBuffer being displayed by this text view. | |
Glib::RefPtr< SourceBuffer > | get_source_buffer () |
Returns the GtkTextBuffer being displayed by this text view. | |
void | set_source_buffer (const Glib::RefPtr< SourceBuffer >& source_buffer) |
Sets a source_buffer as the buffer being displayed by source view. | |
void | set_show_line_numbers (bool show=true) |
If true line numbers will be displayed beside the text. | |
bool | get_show_line_numbers () const |
Returns whether line numbers are displayed beside the text. | |
void | set_tab_width (guint width) |
Sets the width of tabulation in characters. | |
guint | get_tab_width () const |
Returns the width of tabulation in characters. | |
void | set_auto_indent (bool enable=true) |
If true auto indentation of text is enabled. | |
bool | get_auto_indent () const |
Returns whether auto indentation of text is enabled. | |
void | set_insert_spaces_instead_of_tabs (bool enable=true) |
If true any tabulator character inserted is replaced by a group of space characters. | |
bool | get_insert_spaces_instead_of_tabs () const |
Returns whether when inserting a tabulator character it should be replaced by a group of space characters. | |
void | set_show_right_margin (bool show=true) |
If true a right margin is displayed. | |
bool | get_show_right_margin () const |
Returns whether a right margin is displayed. | |
void | set_highlight_current_line (bool highlight=true) |
If highlight is true the current line is highlighted. | |
bool | get_highlight_current_line () const |
Returns whether the current line is highlighted. | |
void | set_right_margin_position (guint margin) |
Sets the position of the right margin. | |
guint | get_right_margin_position () const |
Gets the position of the right margin. | |
void | set_smart_home_end (SourceSmartHomeEndType smart_he) |
Set the desired movement of the cursor when HOME and END keys are pressed. | |
SourceSmartHomeEndType | get_smart_home_end () const |
Returns a SourceSmartHomeEndType end value specifying how the cursor will move when HOME and END keys are pressed. | |
void | set_show_line_marks (bool show=true) |
If true line marks will be displayed beside the text. | |
bool | get_show_line_marks () const |
Returns whether line marks are displayed beside the text. | |
void | set_indent_on_tab (bool enable=true) |
If true , when the tab key is pressed and there is a selection, the selected text is indented of one level instead of being replaced with the \t characters. | |
bool | get_indent_on_tab () const |
Returns whether when the tab key is pressed the current selection should get indented instead of replaced with the \t character. | |
void | set_indent_width (gint width) |
Sets the number of spaces to use for each step of indent. | |
gint | get_indent_width () const |
Returns the number of spaces to use for each step of indent. | |
void | set_mark_category_priority (const Glib::ustring& category, gint priority) |
Set the priority for the given mark category. | |
gint | get_mark_category_priority (const Glib::ustring& category) const |
Gets the priority which is associated with the given category. | |
void | set_mark_category_pixbuf (const Glib::ustring& category, const Glib::RefPtr< Gdk::Pixbuf >& pixbuf) |
Associates a given pixbuf with a given mark category. | |
Glib::RefPtr< Gdk::Pixbuf > | get_mark_category_pixbuf (const Glib::ustring& category) |
Gets the pixbuf which is associated with the given mark category. | |
Glib::RefPtr< const Gdk::Pixbuf > | get_mark_category_pixbuf (const Glib::ustring& category) const |
Gets the pixbuf which is associated with the given mark category. | |
void | set_mark_category_icon (const Glib::ustring& category, const Glib::RefPtr< Gdk::Pixbuf >& pixbuf) |
Sets the icon to be used for category to pixbuf. | |
void | set_mark_category_icon (const Glib::ustring& category, const Gtk::StockID& stock_id) |
Sets the icon to be used for category to the stock item stock_id. | |
void | set_mark_category_icon (const Glib::ustring& category, const Glib::ustring& name) |
Sets the icon to be used for category to the named theme item name. | |
void | unset_mark_category_icon (const Glib::ustring& category) |
Unsets the icon used for category. | |
void | set_mark_category_background (const Glib::ustring& category, const Gdk::Color& color) |
Sets given background color for mark category. | |
void | unset_mark_category_background (const Glib::ustring& category) |
Unsets background for mark category. | |
bool | get_mark_category_background (const Glib::ustring& category, Gdk::Color& dest) const |
Gets the background color associated with given category. | |
void | set_draw_spaces (SourceDrawSpacesFlags flags=SOURCE_DRAW_SPACES_ALL) |
Set if and how the spaces should be visualized. | |
SourceDrawSpacesFlags | get_draw_spaces () const |
Returns the SourceDrawSpacesFlags specifying if and how spaces should be displayed. | |
void | set_mark_category_tooltip_func (const Glib::ustring& category, const SlotMarkTooltip& slot) |
Set a SlotMarkTooltip used to set tooltip on marks from the given mark category. | |
void | set_mark_category_tooltip_markup_func (const Glib::ustring& category, const SlotMarkTooltip& slot) |
Set a SlotMarkTooltip used to set tooltip on marks from the given mark category. | |
void | unset_mark_category_tooltip_func (const Glib::ustring& category) |
Unsets a function used to set tooltip marks from the given mark category. | |
Glib::RefPtr< SourceGutter > | get_gutter (Gtk::TextWindowType window_type) |
Returns the SourceGutter object associated with window_type for this view. | |
Glib::RefPtr< const SourceGutter > | get_gutter (Gtk::TextWindowType window_type) const |
Returns the SourceGutter object associated with window_type for this view. | |
SourceCompletion* | get_completion () |
Gets the SourceCompletion associated with this view. | |
const SourceCompletion* | get_completion () const |
Gets the SourceCompletion associated with this view. | |
Glib::SignalProxy0< void > | signal_redo () |
Emitted when redo action is requested. | |
Glib::SignalProxy0< void > | signal_undo () |
Emitted when undo action is requested. | |
Glib::SignalProxy2< void, Gtk::TextIter&, GdkEvent* > | signal_line_mark_activated () |
Emitted when a line mark has been activated (for instance when there was a button press in the line marks gutter). | |
Glib::PropertyProxy< bool > | property_show_line_numbers () |
Whether to display line numbers. | |
Glib::PropertyProxy_ReadOnly < bool > | property_show_line_numbers () const |
Whether to display line numbers. | |
Glib::PropertyProxy< bool > | property_show_line_marks () |
Whether to display line mark pixbufs. | |
Glib::PropertyProxy_ReadOnly < bool > | property_show_line_marks () const |
Whether to display line mark pixbufs. | |
Glib::PropertyProxy< guint > | property_tab_width () |
Width of a tab character expressed in spaces. | |
Glib::PropertyProxy_ReadOnly < guint > | property_tab_width () const |
Width of a tab character expressed in spaces. | |
Glib::PropertyProxy< int > | property_indent_width () |
Number of spaces to use for each step of indent. | |
Glib::PropertyProxy_ReadOnly< int > | property_indent_width () const |
Number of spaces to use for each step of indent. | |
Glib::PropertyProxy< bool > | property_auto_indent () |
Whether to enable auto indentation. | |
Glib::PropertyProxy_ReadOnly < bool > | property_auto_indent () const |
Whether to enable auto indentation. | |
Glib::PropertyProxy< bool > | property_insert_spaces_instead_of_tabs () |
Whether to insert spaces instead of tabs. | |
Glib::PropertyProxy_ReadOnly < bool > | property_insert_spaces_instead_of_tabs () const |
Whether to insert spaces instead of tabs. | |
Glib::PropertyProxy< bool > | property_show_right_margin () |
Whether to display the right margin. | |
Glib::PropertyProxy_ReadOnly < bool > | property_show_right_margin () const |
Whether to display the right margin. | |
Glib::PropertyProxy< guint > | property_right_margin_position () |
Position of the right margin. | |
Glib::PropertyProxy_ReadOnly < guint > | property_right_margin_position () const |
Position of the right margin. | |
Glib::PropertyProxy < SourceSmartHomeEndType > | property_smart_home_end () |
HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line. | |
Glib::PropertyProxy_ReadOnly < SourceSmartHomeEndType > | property_smart_home_end () const |
HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line. | |
Glib::PropertyProxy< bool > | property_highlight_current_line () |
Whether to highlight the current line. | |
Glib::PropertyProxy_ReadOnly < bool > | property_highlight_current_line () const |
Whether to highlight the current line. | |
Glib::PropertyProxy< bool > | property_indent_on_tab () |
Whether to indent the selected text when the tab key is pressed. | |
Glib::PropertyProxy_ReadOnly < bool > | property_indent_on_tab () const |
Whether to indent the selected text when the tab key is pressed. | |
Glib::PropertyProxy < SourceDrawSpacesFlags > | property_draw_spaces () |
Set if and how the spaces should be visualized. | |
Glib::PropertyProxy_ReadOnly < SourceDrawSpacesFlags > | property_draw_spaces () const |
Set if and how the spaces should be visualized. | |
Static Public Attributes | |
static const int | gutter_position_lines = -30 |
The gutter position of the lines renderer. | |
static const int | gutter_position_marks = -20 |
The gutter position of the marks renderer. | |
Related Functions | |
(Note that these are not member functions.) | |
gtksourceview::SourceView* | wrap (GtkSourceView* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
The view object.
SourceView is the main object of the gtksourceviewmm library. It provides a text view which has syntax highlighting, undo/redo and text marks. Use a SourceBuffer to display text with a GtkSourceView.
typedef sigc::slot<Glib::ustring, const Glib::RefPtr<SourceMark>& > gtksourceview::SourceView::SlotMarkTooltip |
Slot holding a function.
Glib::ustring on_mark_tooltip(const Glib::RefPtr<SourceMark>& mark);
gtksourceview::SourceView::SourceView | ( | ) | [explicit] |
Creates a new SourceView.
An empty default buffer will be created for you. If you want to specify your own buffer, consider the other constructor.
gtksourceview::SourceView::SourceView | ( | const Glib::RefPtr< SourceBuffer >& | buffer | ) | [explicit] |
Creates a new SourceView widget displaying the buffer buffer.
One buffer can be shared among many widgets.
buffer | A SourceBuffer. |
bool gtksourceview::SourceView::get_auto_indent | ( | ) | const |
Returns whether auto indentation of text is enabled.
true
if auto indentation is enabled. SourceCompletion* gtksourceview::SourceView::get_completion | ( | ) |
Gets the SourceCompletion associated with this view.
const SourceCompletion* gtksourceview::SourceView::get_completion | ( | ) | const |
Gets the SourceCompletion associated with this view.
SourceDrawSpacesFlags gtksourceview::SourceView::get_draw_spaces | ( | ) | const |
Returns the SourceDrawSpacesFlags specifying if and how spaces should be displayed.
Glib::RefPtr<SourceGutter> gtksourceview::SourceView::get_gutter | ( | Gtk::TextWindowType | window_type | ) |
Returns the SourceGutter object associated with window_type for this view.
Only Gtk::TEXT_WINDOW_LEFT and Gtk::TEXT_WINDOW_RIGHT are supported, respectively corresponding to the left and right gutter. The line numbers and mark category icons are rendered in the gutter corresponding to Gtk::TEXT_WINDOW_LEFT.
window_type | The gutter window type |
Glib::RefPtr<const SourceGutter> gtksourceview::SourceView::get_gutter | ( | Gtk::TextWindowType | window_type | ) | const |
Returns the SourceGutter object associated with window_type for this view.
Only Gtk::TEXT_WINDOW_LEFT and Gtk::TEXT_WINDOW_RIGHT are supported, respectively corresponding to the left and right gutter. The line numbers and mark category icons are rendered in the gutter corresponding to Gtk::TEXT_WINDOW_LEFT.
window_type | The gutter window type |
bool gtksourceview::SourceView::get_highlight_current_line | ( | ) | const |
Returns whether the current line is highlighted.
true
if the current line is highlighted. bool gtksourceview::SourceView::get_indent_on_tab | ( | ) | const |
Returns whether when the tab key is pressed the current selection should get indented instead of replaced with the \t character.
true
if the selection is indented when tab is pressed.gint gtksourceview::SourceView::get_indent_width | ( | ) | const |
Returns the number of spaces to use for each step of indent.
See set_indent_width() for details.
bool gtksourceview::SourceView::get_insert_spaces_instead_of_tabs | ( | ) | const |
Returns whether when inserting a tabulator character it should be replaced by a group of space characters.
true
if spaces are inserted instead of tabs. bool gtksourceview::SourceView::get_mark_category_background | ( | const Glib::ustring & | category, |
Gdk::Color & | dest | ||
) | const |
Gets the background color associated with given category.
category | A mark category. |
dest | Destination Gdk::Color structure to fill in. |
true
if background color for category was set and dest is set to a valid color, or false
otherwise.Gets the background color associated with given category.
category | A mark category. |
dest | Destination Gdk::Color structure to fill in. |
true
if background color for category was set and dest is set to a valid color, or false
otherwise. Glib::RefPtr<Gdk::Pixbuf> gtksourceview::SourceView::get_mark_category_pixbuf | ( | const Glib::ustring & | category | ) |
Gets the pixbuf which is associated with the given mark category.
category | A mark category. |
Glib::RefPtr<const Gdk::Pixbuf> gtksourceview::SourceView::get_mark_category_pixbuf | ( | const Glib::ustring & | category | ) | const |
Gets the pixbuf which is associated with the given mark category.
category | A mark category. |
gint gtksourceview::SourceView::get_mark_category_priority | ( | const Glib::ustring & | category | ) | const |
Gets the priority which is associated with the given category.
category | A mark category. |
guint gtksourceview::SourceView::get_right_margin_position | ( | ) | const |
Gets the position of the right margin.
bool gtksourceview::SourceView::get_show_line_marks | ( | ) | const |
Returns whether line marks are displayed beside the text.
true
if the line marks are displayed.bool gtksourceview::SourceView::get_show_line_numbers | ( | ) | const |
Returns whether line numbers are displayed beside the text.
true
if the line numbers are displayed. bool gtksourceview::SourceView::get_show_right_margin | ( | ) | const |
Returns whether a right margin is displayed.
true
if the right margin is shown. SourceSmartHomeEndType gtksourceview::SourceView::get_smart_home_end | ( | ) | const |
Returns a SourceSmartHomeEndType end value specifying how the cursor will move when HOME and END keys are pressed.
Glib::RefPtr<const SourceBuffer> gtksourceview::SourceView::get_source_buffer | ( | ) | const |
Returns the GtkTextBuffer being displayed by this text view.
Glib::RefPtr<SourceBuffer> gtksourceview::SourceView::get_source_buffer | ( | ) |
Returns the GtkTextBuffer being displayed by this text view.
guint gtksourceview::SourceView::get_tab_width | ( | ) | const |
Returns the width of tabulation in characters.
Glib::PropertyProxy<bool> gtksourceview::SourceView::property_auto_indent | ( | ) |
Whether to enable auto indentation.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<bool> gtksourceview::SourceView::property_auto_indent | ( | ) | const |
Whether to enable auto indentation.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<SourceDrawSpacesFlags> gtksourceview::SourceView::property_draw_spaces | ( | ) |
Set if and how the spaces should be visualized.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<SourceDrawSpacesFlags> gtksourceview::SourceView::property_draw_spaces | ( | ) | const |
Set if and how the spaces should be visualized.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> gtksourceview::SourceView::property_highlight_current_line | ( | ) |
Whether to highlight the current line.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<bool> gtksourceview::SourceView::property_highlight_current_line | ( | ) | const |
Whether to highlight the current line.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> gtksourceview::SourceView::property_indent_on_tab | ( | ) |
Whether to indent the selected text when the tab key is pressed.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<bool> gtksourceview::SourceView::property_indent_on_tab | ( | ) | const |
Whether to indent the selected text when the tab key is pressed.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<int> gtksourceview::SourceView::property_indent_width | ( | ) |
Number of spaces to use for each step of indent.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<int> gtksourceview::SourceView::property_indent_width | ( | ) | const |
Number of spaces to use for each step of indent.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> gtksourceview::SourceView::property_insert_spaces_instead_of_tabs | ( | ) |
Whether to insert spaces instead of tabs.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<bool> gtksourceview::SourceView::property_insert_spaces_instead_of_tabs | ( | ) | const |
Whether to insert spaces instead of tabs.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<guint> gtksourceview::SourceView::property_right_margin_position | ( | ) |
Position of the right margin.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<guint> gtksourceview::SourceView::property_right_margin_position | ( | ) | const |
Position of the right margin.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> gtksourceview::SourceView::property_show_line_marks | ( | ) |
Whether to display line mark pixbufs.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<bool> gtksourceview::SourceView::property_show_line_marks | ( | ) | const |
Whether to display line mark pixbufs.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> gtksourceview::SourceView::property_show_line_numbers | ( | ) |
Whether to display line numbers.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<bool> gtksourceview::SourceView::property_show_line_numbers | ( | ) | const |
Whether to display line numbers.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> gtksourceview::SourceView::property_show_right_margin | ( | ) |
Whether to display the right margin.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<bool> gtksourceview::SourceView::property_show_right_margin | ( | ) | const |
Whether to display the right margin.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<SourceSmartHomeEndType> gtksourceview::SourceView::property_smart_home_end | ( | ) |
HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<SourceSmartHomeEndType> gtksourceview::SourceView::property_smart_home_end | ( | ) | const |
HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<guint> gtksourceview::SourceView::property_tab_width | ( | ) |
Width of a tab character expressed in spaces.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<guint> gtksourceview::SourceView::property_tab_width | ( | ) | const |
Width of a tab character expressed in spaces.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
void gtksourceview::SourceView::set_auto_indent | ( | bool | enable = true | ) |
If true
auto indentation of text is enabled.
enable | Whether to enable auto indentation. |
void gtksourceview::SourceView::set_draw_spaces | ( | SourceDrawSpacesFlags | flags = SOURCE_DRAW_SPACES_ALL | ) |
Set if and how the spaces should be visualized.
Specifying flags as 0 will disable display of spaces.
flags | SourceDrawSpacesFlags specifing how white spaces should be displayed. |
void gtksourceview::SourceView::set_highlight_current_line | ( | bool | highlight = true | ) |
If highlight is true
the current line is highlighted.
highlight | Whether to highlight the current line. |
void gtksourceview::SourceView::set_indent_on_tab | ( | bool | enable = true | ) |
If true
, when the tab key is pressed and there is a selection, the selected text is indented of one level instead of being replaced with the \t characters.
Shift+Tab unindents the selection.
enable | Whether to indent a block when tab is pressed. |
void gtksourceview::SourceView::set_indent_width | ( | gint | width | ) |
Sets the number of spaces to use for each step of indent.
If width is -1, the value of the SourceView::property_tab_width property will be used.
width | Indent width in characters. |
void gtksourceview::SourceView::set_insert_spaces_instead_of_tabs | ( | bool | enable = true | ) |
If true
any tabulator character inserted is replaced by a group of space characters.
enable | Whether to insert spaces instead of tabs. |
void gtksourceview::SourceView::set_mark_category_background | ( | const Glib::ustring & | category, |
const Gdk::Color & | color | ||
) |
Sets given background color for mark category.
category | A mark category. |
color | Background color. |
Sets given background color for mark category. If color is #0
, the background color is unset.
category | A mark category. |
color | Background color or 0 to unset it. |
void gtksourceview::SourceView::set_mark_category_icon | ( | const Glib::ustring & | category, |
const Glib::RefPtr< Gdk::Pixbuf > & | pixbuf | ||
) |
Sets the icon to be used for category to pixbuf.
category | A mark category. |
pixbuf | A Gdk::Pixbuf or empty Glib::RefPtr. |
void gtksourceview::SourceView::set_mark_category_icon | ( | const Glib::ustring & | category, |
const Gtk::StockID & | stock_id | ||
) |
Sets the icon to be used for category to the stock item stock_id.
category | A mark category. |
stock_id | The stock id. |
void gtksourceview::SourceView::set_mark_category_icon | ( | const Glib::ustring & | category, |
const Glib::ustring & | name | ||
) |
Sets the icon to be used for category to the named theme item name.
category | A mark category. |
name | The themed icon name. |
void gtksourceview::SourceView::set_mark_category_pixbuf | ( | const Glib::ustring & | category, |
const Glib::RefPtr< Gdk::Pixbuf > & | pixbuf | ||
) |
Associates a given pixbuf with a given mark category.
If pixbuf is empty, the pixbuf is unset.
category | A mark category. |
pixbuf | A Gdk::Pixbuf or empty Glib::RefPtr. |
void gtksourceview::SourceView::set_mark_category_priority | ( | const Glib::ustring & | category, |
gint | priority | ||
) |
Set the priority for the given mark category.
When there are multiple marks on the same line, marks of categories with higher priorities will be drawn on top.
category | A mark category. |
priority | The priority for the category. |
void gtksourceview::SourceView::set_mark_category_tooltip_func | ( | const Glib::ustring & | category, |
const SlotMarkTooltip& | slot | ||
) |
Set a SlotMarkTooltip used to set tooltip on marks from the given mark category.
If you also specified a function with set_mark_category_tooltip_markup_func() the markup variant takes precedence.
static Glib::ustring tooltip_func (gtksourceview::SourceMark *mark) { return get_tooltip_for_mark(mark); } ... SourceView view; view->set_mark_category_tooltip_func("other-mark", sigc::ptr_fun(&tooltip_func));
category | A mark category. |
slot | A SlotMarkTooltip. |
void gtksourceview::SourceView::set_mark_category_tooltip_markup_func | ( | const Glib::ustring & | category, |
const SlotMarkTooltip& | slot | ||
) |
Set a SlotMarkTooltip used to set tooltip on marks from the given mark category.
See set_mark_category_tooltip_func() for more information.
category | A mark category. |
slot | A SlotMarkTooltip. |
void gtksourceview::SourceView::set_right_margin_position | ( | guint | margin | ) |
Sets the position of the right margin.
margin | The width in characters where to position the right margin. |
void gtksourceview::SourceView::set_show_line_marks | ( | bool | show = true | ) |
If true
line marks will be displayed beside the text.
show | Whether line marks should be displayed. |
void gtksourceview::SourceView::set_show_line_numbers | ( | bool | show = true | ) |
If true
line numbers will be displayed beside the text.
show | Whether line numbers should be displayed. |
void gtksourceview::SourceView::set_show_right_margin | ( | bool | show = true | ) |
If true
a right margin is displayed.
show | Whether to show a right margin. |
void gtksourceview::SourceView::set_smart_home_end | ( | SourceSmartHomeEndType | smart_he | ) |
Set the desired movement of the cursor when HOME and END keys are pressed.
smart_he | The desired behavior among SourceSmartHomeEndType. |
void gtksourceview::SourceView::set_source_buffer | ( | const Glib::RefPtr< SourceBuffer >& | source_buffer | ) |
Sets a source_buffer as the buffer being displayed by source view.
The previous buffer displayed by the text view is unreferenced, and a reference is added to buffer.
source_buffer | A SourceBuffer. |
void gtksourceview::SourceView::set_tab_width | ( | guint | width | ) |
Sets the width of tabulation in characters.
width | Width of tab in characters. |
Glib::SignalProxy2< void,Gtk::TextIter&,GdkEvent* > gtksourceview::SourceView::signal_line_mark_activated | ( | ) |
Emitted when a line mark has been activated (for instance when there was a button press in the line marks gutter).
You can use iter to determine on which line the activation took place.
void on_my_line_mark_activated(Gtk::TextIter& mark, GdkEvent* event)
Glib::SignalProxy0< void > gtksourceview::SourceView::signal_redo | ( | ) |
Emitted when redo action is requested.
void on_my_redo()
Glib::SignalProxy0< void > gtksourceview::SourceView::signal_undo | ( | ) |
Emitted when undo action is requested.
void on_my_undo()
void gtksourceview::SourceView::unset_mark_category_background | ( | const Glib::ustring & | category | ) |
Unsets background for mark category.
category | A mark category. |
void gtksourceview::SourceView::unset_mark_category_icon | ( | const Glib::ustring & | category | ) |
void gtksourceview::SourceView::unset_mark_category_tooltip_func | ( | const Glib::ustring & | category | ) |
Unsets a function used to set tooltip marks from the given mark category.
category | A mark category. |
gtksourceview::SourceView* wrap | ( | GtkSourceView * | object, |
bool | take_copy = false |
||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |