#include <sourceview.h>
Public Types | |
typedef SourceView | CppObjectType |
typedef SourceView_Class | CppClassType |
typedef GtkSourceView | BaseObjectType |
typedef GtkSourceViewClass | BaseClassType |
Public Member Functions | |
virtual | ~SourceView () |
GtkSourceView * | gobj () |
Provides access to the underlying C GtkObject. | |
const GtkSourceView * | gobj () const |
Provides access to the underlying C GtkObject. | |
SourceView () | |
default constructor | |
SourceView (const Glib::RefPtr< SourceBuffer > &buffer) | |
constructor. | |
Glib::RefPtr< const SourceBuffer > | get_source_buffer () const |
get the source buffer associated to the current instance | |
Glib::RefPtr< SourceBuffer > | get_source_buffer () |
get the source buffer associated to the current instance | |
void | set_source_buffer (const Glib::RefPtr< SourceBuffer > &source_buffer) |
set the source buffer to be displayed by the SourceView | |
void | set_show_line_numbers (bool show=true) |
display line numbers beside the text, or not | |
bool | get_show_line_numbers () const |
test whether line numbers are displayed beside the text | |
void | set_tab_width (guint width) |
set tabs width | |
guint | get_tab_width () const |
get tab width | |
void | set_auto_indent (bool enable=true) |
set automatic text indention or not | |
bool | get_auto_indent () const |
test whether automatic text indentation is activated | |
void | set_insert_spaces_instead_of_tabs (bool enable=true) |
activate (or de-activate) the replacement of any inserted tabulator character by a group of space character | |
bool | get_insert_spaces_instead_of_tabs () const |
test whether the replacement of any inserted tabulator character by a group of space character is activated | |
void | set_show_right_margin (bool show=true) |
activate (or de-activate) the display of a margin | |
bool | get_show_right_margin () const |
test if a margin is displayed | |
void | set_highlight_current_line (bool highlight=true) |
do highlight the currently selected line, or not | |
bool | get_highlight_current_line () const |
test if the currently selected line is to be hightlighted | |
void | set_right_margin_position (guint margin) |
set the position of the right margin | |
guint | get_right_margin_position () const |
get the position of the right margin | |
void | set_smart_home_end (SourceSmartHomeEndType smart_he) |
activate whether if HOME and END keys will move to the first/last non space character of the line before moving to the start/end | |
SourceSmartHomeEndType | get_smart_home_end () const |
test whether if HOME and END keys will move to the first/last non space character of the line before moving to the start/end | |
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 show=true) |
bool | get_indent_on_tab () const |
void | set_indent_width (gint width) |
Sets the number of spaces to use for each step of indent. | |
gint | get_indent_width () const |
Set 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. If pixbuf is NULL, the pixbuf is unset. | |
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. | |
Glib::SignalProxy0< void > | signal_redo () |
Glib::SignalProxy0< void > | signal_undo () |
Static Public Member Functions | |
static GType | get_type () G_GNUC_CONST |
static GType | get_base_type () G_GNUC_CONST |
static Glib::RefPtr< SourceView > | create () |
static Glib::RefPtr< SourceView > | create (const Glib::RefPtr< SourceBuffer > &buffer) |
Protected Member Functions | |
SourceView (const Glib::ConstructParams &construct_params) | |
SourceView (GtkSourceView *castitem) | |
Friends | |
class | SourceView_Class |
Related Functions | |
(Note that these are not member functions.) | |
gtksourceview::SourceView * | wrap (GtkSourceView *object, bool take_copy=false) |
It displays a Gtk::SourceBuffer.
typedef SourceView_Class gtksourceview::SourceView::CppClassType |
virtual gtksourceview::SourceView::~SourceView | ( | ) | [virtual] |
gtksourceview::SourceView::SourceView | ( | const Glib::ConstructParams & | construct_params | ) | [explicit, protected] |
gtksourceview::SourceView::SourceView | ( | GtkSourceView * | castitem | ) | [explicit, protected] |
gtksourceview::SourceView::SourceView | ( | ) | [explicit] |
default constructor
gtksourceview::SourceView::SourceView | ( | const Glib::RefPtr< SourceBuffer > & | buffer | ) | [explicit] |
constructor.
create an instance of SourceView displaying a given buffer
buffer | the buffer to display in the SourceView |
static GType gtksourceview::SourceView::get_type | ( | ) | [static] |
static GType gtksourceview::SourceView::get_base_type | ( | ) | [static] |
GtkSourceView* gtksourceview::SourceView::gobj | ( | ) | [inline] |
Provides access to the underlying C GtkObject.
const GtkSourceView* gtksourceview::SourceView::gobj | ( | ) | const [inline] |
Provides access to the underlying C GtkObject.
static Glib::RefPtr<SourceView> gtksourceview::SourceView::create | ( | ) | [static] |
static Glib::RefPtr<SourceView> gtksourceview::SourceView::create | ( | const Glib::RefPtr< SourceBuffer > & | buffer | ) | [static] |
Glib::RefPtr<const SourceBuffer> gtksourceview::SourceView::get_source_buffer | ( | ) | const |
get the source buffer associated to the current instance
Glib::RefPtr<SourceBuffer> gtksourceview::SourceView::get_source_buffer | ( | ) |
get the source buffer associated to the current instance
void gtksourceview::SourceView::set_source_buffer | ( | const Glib::RefPtr< SourceBuffer > & | source_buffer | ) |
set the source buffer to be displayed by the SourceView
source_buffer | the source buffer to set |
void gtksourceview::SourceView::set_show_line_numbers | ( | bool | show = true |
) |
display line numbers beside the text, or not
show | if true, line numbers will be displayed beside test text. If true line numbers will be displayed beside the text. | |
show | Whether line numbers should be displayed. |
bool gtksourceview::SourceView::get_show_line_numbers | ( | ) | const |
test whether line numbers are displayed beside the text
true
if the line numbers are displayed.
true
if the line numbers are displayed.
void gtksourceview::SourceView::set_tab_width | ( | guint | width | ) |
set tabs width
width | the new tab width Sets the width of tabulation in characters. | |
width | Width of tab in characters. |
guint gtksourceview::SourceView::get_tab_width | ( | ) | const |
get tab width
Width of tab.
void gtksourceview::SourceView::set_auto_indent | ( | bool | enable = true |
) |
set automatic text indention or not
enable | if true, automatic text indentation is activated If true auto indentation of text is enabled. | |
enable | Whether to enable auto indentation. |
bool gtksourceview::SourceView::get_auto_indent | ( | ) | const |
test whether automatic text indentation is activated
true
if auto indentation is enabled.
true
if auto indentation is enabled.
void gtksourceview::SourceView::set_insert_spaces_instead_of_tabs | ( | bool | enable = true |
) |
activate (or de-activate) the replacement of any inserted tabulator character by a group of space character
enable | if true, any tabulator character inserted is replaced by a group of space character If true any tabulator character inserted is replaced by a group of space characters. | |
enable | Whether to insert spaces instead of tabs. |
bool gtksourceview::SourceView::get_insert_spaces_instead_of_tabs | ( | ) | const |
test whether the replacement of any inserted tabulator character by a group of space character is activated
true
if spaces are inserted instead of tabs.
true
if spaces are inserted instead of tabs.
void gtksourceview::SourceView::set_show_right_margin | ( | bool | show = true |
) |
activate (or de-activate) the display of a margin
show | if true, activate the display of a margin If true a right margin is displayed | |
show | Whether to show a right margin. |
bool gtksourceview::SourceView::get_show_right_margin | ( | ) | const |
test if a margin is displayed
true
if the right margin is shown.
true
if the right margin is shown.
void gtksourceview::SourceView::set_highlight_current_line | ( | bool | highlight = true |
) |
do highlight the currently selected line, or not
highlight | if true, do highlight the currently selected line If show is true the current line is highlighted. | |
show | Whether to highlight the current line. |
bool gtksourceview::SourceView::get_highlight_current_line | ( | ) | const |
test if the currently selected line is to be hightlighted
true
if the current line is highlighted.
true
if the current line is highlighted.
void gtksourceview::SourceView::set_right_margin_position | ( | guint | margin | ) |
set the position of the right margin
margin | the position (in pixels) of the right margin Sets the position of the right margin in the given view. | |
pos | The width in characters where to position the right margin. | |
pos | The width in characters where to position the right margin. |
guint gtksourceview::SourceView::get_right_margin_position | ( | ) | const |
get the position of the right margin
The position of the right margin.
void gtksourceview::SourceView::set_smart_home_end | ( | SourceSmartHomeEndType | smart_he | ) |
activate whether if HOME and END keys will move to the first/last non space character of the line before moving to the start/end
if true, HOME and END keys will move to the first/last non space character of the line before moving to the start/end Set the desired movement of the cursor when HOME and END keys are pressed.
smart_he | The desired behavior among Gtk::SourceSmartHomeEndType. |
SourceSmartHomeEndType gtksourceview::SourceView::get_smart_home_end | ( | ) | const |
test whether if HOME and END keys will move to the first/last non space character of the line before moving to the start/end
A Gtk::SourceSmartHomeEndType.
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. If true line marks will be displayed beside the text. | |
show | Whether line marks should be displayed. |
bool gtksourceview::SourceView::get_show_line_marks | ( | ) | const |
Returns whether line marks are displayed beside the text.
true
if the line marks are displayed.
true
if the line marks are displayed.
void gtksourceview::SourceView::set_indent_on_tab | ( | bool | show = 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 characters. Shift+Tab unindents the selection.
show | true if the selection is indented when tab is pressed. 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 characters. Shift+Tab unindents the selection. |
enable | Whether to indent a block when tab is pressed. |
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 character.
true
if the selection is indented when tab is pressed.
true
if the selection is indented 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 GtkSourceView::tab-width property will be used.
width | indent width in characters Sets the number of spaces to use for each step of indent. If width is -1, the value of the GtkSourceView::tab-width property will be used. | |
width | Indent width in characters. |
gint gtksourceview::SourceView::get_indent_width | ( | ) | const |
Set Returns the number of spaces to use for each step of indent.
See SourceView::set_indent_width(gint) for details.
Indent width.
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 of category 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. |
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. |
category | A mark category. |
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 NULL, the pixbuf is unset.
category | a mark category. | |
pixbuf | the pixbuf to associate the mark category to. Associates a given pixbuf with a given mark category. If pixbuf is #0 , the pixbuf is unset. | |
category | A mark category. | |
pixbuf | A Gdk::Pixbuf or #0 . |
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. |
category | A mark category. |
0
if not found.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. |
category | A mark category. |
0
if not found.Glib::SignalProxy0< void > gtksourceview::SourceView::signal_redo | ( | ) |
void on_my_redo()
Glib::SignalProxy0< void > gtksourceview::SourceView::signal_undo | ( | ) |
void on_my_undo()
friend class SourceView_Class [friend] |
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. |