gtksourceviewmm 3.18.0

Public Types | Public Member Functions | Protected Attributes | Related Symbols | List of all members
Gsv::Markup Class Reference

It is just a class holding markup string. More...

`#include <gtksourceviewmm/markup.h>`

## Public Types
typedef const void* | BoolExpr
| This typedef is just to make it more obvious that our operator const void*() should be used like operator bool().

## Public Member Functions
| Markup ()
| Creates empty Markup.
| Markup (const Glib::ustring& markup)
| Creates Markup containing text from markup.
| Markup (const char* markup)
| Creates Markup containing text from markup.
| ~Markup ()
| Markup (const Markup& other)
| Creates Markup containing text from other Markup.
Markup& | operator= (const Markup& other)
| Assigns contents of other Markup to this one.
| operator BoolExpr () const
| Checks if Markup is not empty.
bool | equal (const Markup& other) const
| Checks if other Markup is the same as this one.
Glib::ustring | get_string () const
| Get the string representation of the Markup.
const char* | get_c_str () const
| Get the C string representation of the Markup.

## Protected Attributes
Glib::ustring | markup_

## Related Symbols
(Note that these are not member symbols.)
bool | operator== (const Markup& lhs, const Markup& rhs)
| See Markup::equal()
bool | operator!= (const Markup& lhs, const Markup& rhs)
| See Markup::equal()

## Detailed Description

It is just a class holding markup string.

This class exists because now nice constructor overload could be used in some places.

Since gtksourceviewmm 2.10

## Member Typedef Documentation

## ◆ BoolExpr

typedef const void* Gsv::Markup::BoolExpr

This typedef is just to make it more obvious that our operator const void*() should be used like operator bool().

## Constructor & Destructor Documentation

## ◆ Markup() [1/4]

Gsv::Markup::Markup | ( |  | ) |

Creates empty Markup.

Returns
  A new Markup.

Since gtksourceviewmm 2.10

## ◆ Markup() [2/4]

Gsv::Markup::Markup | ( | const Glib::ustring & | markup | ) |
| explicit

Creates Markup containing text from markup.

Parameters

  markup | A markup string.

Returns
  A new Markup.

Since gtksourceviewmm 2.10

## ◆ Markup() [3/4]

Gsv::Markup::Markup | ( | const char * | markup | ) |
| explicit

Creates Markup containing text from markup.

Parameters

  markup | A markup C string.

Returns
  A new Markup.

Since gtksourceviewmm 2.10

## ◆ ~Markup()

Gsv::Markup::~Markup | ( |  | ) |

## ◆ Markup() [4/4]

Gsv::Markup::Markup | ( | const Markup& | other | ) |

Creates Markup containing text from other Markup.

Parameters

  other | Other Markup.

Returns
  A new Markup.

Since gtksourceviewmm 2.10

## Member Function Documentation

## ◆ equal()

bool Gsv::Markup::equal | ( | const Markup& | other | ) | const

Checks if other Markup is the same as this one.

Parameters

  other | Other Markup.

Returns
  `true` if both this and other Markup are equal.

Since gtksourceviewmm 2.10

## ◆ get_c_str()

const char * Gsv::Markup::get_c_str | ( |  | ) | const

Get the C string representation of the Markup.

Returns
  A C string holding markup.

Since gtksourceviewmm 2.10

## ◆ get_string()

Glib::ustring Gsv::Markup::get_string | ( |  | ) | const

Get the string representation of the Markup.

Returns
  A string holding markup.

Since gtksourceviewmm 2.10

## ◆ operator BoolExpr()

Gsv::Markup::operator BoolExpr | ( |  | ) | const

Checks if Markup is not empty.

For instance,

if(markup)
do_something()

Returns
  `true` if Markup is not empty, otherwise `false`.

Since gtksourceviewmm 2.10

## ◆ operator=()

Markup& Gsv::Markup::operator= | ( | const Markup& | other | ) |

Assigns contents of other Markup to this one.

Parameters

  other | Other Markup.

Returns
  This Markup.

Since gtksourceviewmm 2.10

## Friends And Related Symbol Documentation

## ◆ operator!=()

bool operator!= | ( | const Markup& | lhs,
|  | const Markup& | rhs )
| related

See Markup::equal()

Parameters

  lhs | First Markup to compare.
  rhs | Second Markup to compare.

Returns
  Whether lhs is different from rhs.

Since gtksourceviewmm 2.10

## ◆ operator==()

bool operator== | ( | const Markup& | lhs,
|  | const Markup& | rhs )
| related

See Markup::equal()

Parameters

  lhs | First Markup to compare.
  rhs | Second Markup to compare.

Returns
  Whether lhs is different from rhs.

Since gtksourceviewmm 2.10

## Member Data Documentation

## ◆ markup_

Glib::ustring Gsv::Markup::markup_
| protected