gtksourceviewmm: Gsv::SearchSettings Class Reference

gtksourceviewmm 3.21.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

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

`#include <gtksourceviewmm/searchsettings.h>`

Inheritance diagram for Gsv::SearchSettings:
[legend]

## Public Member Functions
| SearchSettings (SearchSettings&& src) noexcept
SearchSettings& | operator= (SearchSettings&& src) noexcept
| ~SearchSettings () noexceptoverride
GtkSourceSearchSettings* | gobj ()
| Provides access to the underlying C GObject. More...
const GtkSourceSearchSettings* | gobj () const
| Provides access to the underlying C GObject. More...
GtkSourceSearchSettings* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
void | set_search_text (const Glib::ustring& search_text)
| Sets the text to search. More...
Glib::ustring | get_search_text () const
| Gets the text to search. More...
void | set_case_sensitive (bool case_sensitive=true)
| Enables or disables the case sensitivity for the search. More...
bool | get_case_sensitive () const
void | set_at_word_boundaries (bool at_word_boundaries=true)
| Change whether the search is done at word boundaries. More...
bool | get_at_word_boundaries () const
void | set_wrap_around (bool wrap_around=true)
| Enables or disables the wrap around search. More...
bool | get_wrap_around () const
void | set_regex_enabled (bool regex_enabled=true)
| Enables or disables whether to search by regular expressions. More...
bool | get_regex_enabled () const
Glib::PropertyProxy< bool > | property_at_word_boundaries ()
| Search at word boundaries. More...
Glib::PropertyProxy_ReadOnly< bool > | property_at_word_boundaries () const
| Search at word boundaries. More...
Glib::PropertyProxy< bool > | property_case_sensitive ()
| Case sensitive. More...
Glib::PropertyProxy_ReadOnly< bool > | property_case_sensitive () const
| Case sensitive. More...
Glib::PropertyProxy< bool > | property_regex_enabled ()
| Whether to search by regular expression. More...
Glib::PropertyProxy_ReadOnly< bool > | property_regex_enabled () const
| Whether to search by regular expression. More...
Glib::PropertyProxy< Glib::ustring > | property_search_text ()
| The text to search. More...
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_search_text () const
| The text to search. More...
Glib::PropertyProxy< bool > | property_wrap_around ()
| Wrap around. More...
Glib::PropertyProxy_ReadOnly< bool > | property_wrap_around () const
| Wrap around. More...
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void > &&slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, sigc::slot< void > &&slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const
Public Member Functions inherited from sigc::trackable
| trackable () noexcept
| trackable (const trackable &src) noexcept
| trackable (trackable &&src)
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src)
void | remove_destroy_notify_callback (void *data) const

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

## Protected Member Functions
| SearchSettings ()
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
| ~Object () noexceptoverride
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

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

## Additional Inherited Members
Public Types inherited from Glib::Object
typedef void(*)(gpointer data | DestroyNotify)
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify

## 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

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

Gsv::SearchSettings::~SearchSettings | ( |  | ) |
| overridenoexcept

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

## Member Function Documentation

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

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

Returns
  whether to search at word boundaries.

Since gtksourceviewmm 3.10:

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

Returns
  whether the search is case sensitive.

Since gtksourceviewmm 3.10:

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

Parameters

  whether | to search by regular expressions.

Since gtksourceviewmm 3.10:

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:

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

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

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

Returns
  whether to wrap around the search.

Since gtksourceviewmm 3.10:

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

Provides access to the underlying C GObject.

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

Provides access to the underlying C GObject.

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.

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

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

Search at word boundaries.

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.

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

Search at word boundaries.

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

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

Case sensitive.

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.

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

Case sensitive.

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

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

Whether to search by regular expression.

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.

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

Whether to search by regular expression.

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

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

The text to search.

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.

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

The text to search.

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

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

Wrap around.

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.

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

Wrap around.

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

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:

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:

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:

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:

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 Function Documentation

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.