gtksourceviewmm 3.91.1

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Symbols | List of all members
Gsv::SearchSettings Class Reference

A GtkSourceSearchSettings object represents the settings of a search. More...

`#include <gtksourceviewmm/searchsettings.h>`

Inherits Glib::Object.

## Public Member Functions
| SearchSettings (SearchSettings&& src) noexcept
SearchSettings& | operator= (SearchSettings&& src) noexcept
| ~SearchSettings () noexcept override
GtkSourceSearchSettings* | gobj ()
| Provides access to the underlying C GObject.
const GtkSourceSearchSettings* | gobj () const
| Provides access to the underlying C GObject.
GtkSourceSearchSettings* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void | set_search_text (const Glib::ustring& search_text)
| Sets the text to search.
Glib::ustring | get_search_text () const
| Gets the text to search.
void | set_case_sensitive (bool case_sensitive=true)
| Enables or disables the case sensitivity for the search.
bool | get_case_sensitive () const
void | set_at_word_boundaries (bool at_word_boundaries=true)
| Change whether the search is done at word boundaries.
bool | get_at_word_boundaries () const
void | set_wrap_around (bool wrap_around=true)
| Enables or disables the wrap around search.
bool | get_wrap_around () const
void | set_regex_enabled (bool regex_enabled=true)
| Enables or disables whether to search by regular expressions.
bool | get_regex_enabled () const
Glib::PropertyProxy< bool > | property_at_word_boundaries ()
| Search at word boundaries.
Glib::PropertyProxy_ReadOnly< bool > | property_at_word_boundaries () const
| Search at word boundaries.
Glib::PropertyProxy< bool > | property_case_sensitive ()
| Case sensitive.
Glib::PropertyProxy_ReadOnly< bool > | property_case_sensitive () const
| Case sensitive.
Glib::PropertyProxy< bool > | property_regex_enabled ()
| Whether to search by regular expression.
Glib::PropertyProxy_ReadOnly< bool > | property_regex_enabled () const
| Whether to search by regular expression.
Glib::PropertyProxy< Glib::ustring > | property_search_text ()
| The text to search.
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_search_text () const
| The text to search.
Glib::PropertyProxy< bool > | property_wrap_around ()
| Wrap around.
Glib::PropertyProxy_ReadOnly< bool > | property_wrap_around () const
| Wrap around.

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system.
static Glib::RefPtr< SearchSettings > | create ()

## Protected Member Functions
| SearchSettings ()

## Related Symbols
(Note that these are not member symbols.)
Glib::RefPtr< Gsv::SearchSettings > | wrap (GtkSourceSearchSettings* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

A GtkSourceSearchSettings object represents the settings of a search.

The search settings can be associated with one or several GtkSourceSearchContexts.

Since gtksourceviewmm 3.10

## Constructor & Destructor Documentation

## ◆ SearchSettings() [1/2]

Gsv::SearchSettings::SearchSettings | ( | SearchSettings&& | src | ) |
| noexcept

## ◆ ~SearchSettings()

Gsv::SearchSettings::~SearchSettings | ( |  | ) |
| override noexcept

## ◆ SearchSettings() [2/2]

Gsv::SearchSettings::SearchSettings | ( |  | ) |
| protected

## Member Function Documentation

## ◆ create()

static Glib::RefPtr< SearchSettings > Gsv::SearchSettings::create | ( |  | ) |
| static

## ◆ get_at_word_boundaries()

bool Gsv::SearchSettings::get_at_word_boundaries | ( |  | ) | const

Returns
  whether to search at word boundaries.

Since gtksourceviewmm 3.10

## ◆ get_case_sensitive()

bool Gsv::SearchSettings::get_case_sensitive | ( |  | ) | const

Returns
  whether the search is case sensitive.

Since gtksourceviewmm 3.10

## ◆ get_regex_enabled()

bool Gsv::SearchSettings::get_regex_enabled | ( |  | ) | const

Parameters

  whether | to search by regular expressions.

Since gtksourceviewmm 3.10

## ◆ get_search_text()

Glib::ustring Gsv::SearchSettings::get_search_text | ( |  | ) | const

Gets the text to search.

The return value must not be freed.

You may be interested to call gtk_source_utils_escape_search_text() after this function.

Returns
  the text to search, or NULL if the search is disabled.

Since gtksourceviewmm 3.10

## ◆ get_type()

static GType Gsv::SearchSettings::get_type | ( |  | ) |
| static

Get the GType for this class, for use with the underlying GObject type system.

## ◆ get_wrap_around()

bool Gsv::SearchSettings::get_wrap_around | ( |  | ) | const

Returns
  whether to wrap around the search.

Since gtksourceviewmm 3.10

## ◆ gobj() [1/2]

GtkSourceSearchSettings * Gsv::SearchSettings::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

## ◆ gobj() [2/2]

const GtkSourceSearchSettings * Gsv::SearchSettings::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

## ◆ gobj_copy()

GtkSourceSearchSettings * Gsv::SearchSettings::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

## ◆ operator=()

SearchSettings& Gsv::SearchSettings::operator= | ( | SearchSettings&& | src | ) |
| noexcept

## ◆ property_at_word_boundaries() [1/2]

Glib::PropertyProxy< bool > Gsv::SearchSettings::property_at_word_boundaries | ( |  | ) |

Search at word boundaries.

Default value: `false`

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

## ◆ property_at_word_boundaries() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gsv::SearchSettings::property_at_word_boundaries | ( |  | ) | const

Search at word boundaries.

Default value: `false`

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ property_case_sensitive() [1/2]

Glib::PropertyProxy< bool > Gsv::SearchSettings::property_case_sensitive | ( |  | ) |

Case sensitive.

Default value: `false`

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

## ◆ property_case_sensitive() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gsv::SearchSettings::property_case_sensitive | ( |  | ) | const

Case sensitive.

Default value: `false`

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ property_regex_enabled() [1/2]

Glib::PropertyProxy< bool > Gsv::SearchSettings::property_regex_enabled | ( |  | ) |

Whether to search by regular expression.

Default value: `false`

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

## ◆ property_regex_enabled() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gsv::SearchSettings::property_regex_enabled | ( |  | ) | const

Whether to search by regular expression.

Default value: `false`

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ property_search_text() [1/2]

Glib::PropertyProxy< Glib::ustring > Gsv::SearchSettings::property_search_text | ( |  | ) |

The text to search.

Default value: ""

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

## ◆ property_search_text() [2/2]

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gsv::SearchSettings::property_search_text | ( |  | ) | const

The text to search.

Default value: ""

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ property_wrap_around() [1/2]

Glib::PropertyProxy< bool > Gsv::SearchSettings::property_wrap_around | ( |  | ) |

Wrap around.

Default value: `false`

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

## ◆ property_wrap_around() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gsv::SearchSettings::property_wrap_around | ( |  | ) | const

Wrap around.

Default value: `false`

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ set_at_word_boundaries()

void Gsv::SearchSettings::set_at_word_boundaries | ( | bool | at_word_boundaries = true | ) |

Change whether the search is done at word boundaries.

If at_word_boundaries is TRUE, a search match must start and end a word. The match can span multiple words. See also gtk_text_iter_starts_word() and gtk_text_iter_ends_word().

Parameters

  at_word_boundaries | the setting.

Since gtksourceviewmm 3.10

## ◆ set_case_sensitive()

void Gsv::SearchSettings::set_case_sensitive | ( | bool | case_sensitive = true | ) |

Enables or disables the case sensitivity for the search.

Parameters

  case_sensitive | the setting.

Since gtksourceviewmm 3.10

## ◆ set_regex_enabled()

void Gsv::SearchSettings::set_regex_enabled | ( | bool | regex_enabled = true | ) |

Enables or disables whether to search by regular expressions.

If enabled, the "search-text" property contains the pattern of the regular expression.

Parameters

  regex_enabled | the setting.

Since gtksourceviewmm 3.10

## ◆ set_search_text()

void Gsv::SearchSettings::set_search_text | ( | const Glib::ustring & | search_text | ) |

Sets the text to search.

If text is NULL or is empty, the search will be disabled. A copy of text will be made, so you can safely free text after a call to this function.

You may be interested to call gtk_source_utils_unescape_search_text() before this function.

Parameters

  search_text | the nul-terminated text to search, or NULL to disable the search.

Since gtksourceviewmm 3.10

## ◆ set_wrap_around()

void Gsv::SearchSettings::set_wrap_around | ( | bool | wrap_around = true | ) |

Enables or disables the wrap around search.

If wrap_around is TRUE, the forward search continues at the beginning of the buffer if no search occurrences are found. Similarly, the backward search continues to search at the end of the buffer.

Parameters

  wrap_around | the setting.

Since gtksourceviewmm 3.10

## Friends And Related Symbol Documentation

## ◆ wrap()

Glib::RefPtr< Gsv::SearchSettings > wrap | ( | GtkSourceSearchSettings * | object,
|  | bool | take_copy = false )
| related

A Glib::wrap() method for this object.

Parameters

  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.

Returns
  A C++ instance that wraps this C instance.