gtkmm: Gtk::StockID Class Reference

gtkmm 3.14.0

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

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

Public Types | Public Member Functions | Protected Attributes | Related Functions | List of all members
Gtk::StockID Class Reference

See also Gtk::BuiltinStockID. More...

`#include <gtkmm/stockid.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(). More...

## Public Member Functions
| StockID ()
| Create an empty StockID. More...
| StockID (const BuiltinStockID& id)
| Create a StockID from one of the build-in stock ids. More...
| StockID (const Glib::ustring& id)
| Create a StockID from its string representation. More...
| StockID (const char* id)
| Create a StockID from its string representation. More...
| ~StockID ()
| StockID (const StockID& other)
| Create a StockID as copy from another. More...
StockID& | operator= (const StockID& other)
| Check if the StockIDs are equal. More...
| operator BoolExpr () const
| Tests whether the StockID is not empty. More...
bool | equal (const StockID& rhs) const
| Check if two StockIDs are equal. More...
Glib::ustring | get_string () const
| Get the string representation of the StockID. More...
const char* | get_c_str () const
| Get the string representation as a const gchar*. More...

## Protected Attributes
Glib::ustring | id_

## Related Functions
(Note that these are not member functions.)
bool | operator== (const StockID& lhs, const StockID& rhs)
bool | operator!= (const StockID& lhs, const StockID& rhs)

## Detailed Description

See also Gtk::BuiltinStockID.

Deprecated:
  Use icon names instead of StockItem, StockID and BuiltinStockID.

## Member Typedef Documentation

typedef const void* Gtk::StockID::BoolExpr

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

## Constructor & Destructor Documentation

Gtk::StockID::StockID | ( |  | ) |

Create an empty StockID.

Gtk::StockID::StockID | ( | const BuiltinStockID& | id | ) |

Create a StockID from one of the build-in stock ids.

See also Gtk::BuildinStockID.

Gtk::StockID::StockID | ( | const Glib::ustring & | id | ) |
| explicit

Create a StockID from its string representation.

Parameters

  id | string representation of the stock id. Usually something like "gtk-about".

Gtk::StockID::StockID | ( | const char * | id | ) |
| explicit

Create a StockID from its string representation.

Parameters

  id | string representation of the stock id. Usually something like "gtk-about".

If id is 0 an empty StockID will be created.

Gtk::StockID::~StockID | ( |  | ) |

Gtk::StockID::StockID | ( | const StockID& | other | ) |

Create a StockID as copy from another.

Parameters

  other | StockID to copy.

## Member Function Documentation

bool Gtk::StockID::equal | ( | const StockID& | rhs | ) | const

Check if two StockIDs are equal.

Parameters

  rhs | Another StockID.

Returns
  `true` if both ids equal - `false` otherwise.

const char* Gtk::StockID::get_c_str | ( |  | ) | const

Get the string representation as a const gchar*.

Returns
  string representation as const gchar*.

Glib::ustring Gtk::StockID::get_string | ( |  | ) | const

Get the string representation of the StockID.

Returns
  something like "gtk-about".

Gtk::StockID::operator BoolExpr | ( |  | ) | const

Tests whether the StockID is not empty.

For instance,

if(stockid)
do_something()

StockID& Gtk::StockID::operator= | ( | const StockID& | other | ) |

Check if the StockIDs are equal.

Parameters

  other | Another StockID.

## Friends And Related Function Documentation

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

Deprecated:
  Use icon names instead of StockItem, StockID and BuiltinStockID.

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

Deprecated:
  Use icon names instead of StockItem, StockID and BuiltinStockID.

## Member Data Documentation

Glib::ustring Gtk::StockID::id_
| protected