gtkmm 3.89.4

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

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

Public Member Functions | Static Public Member Functions | List of all members
Gtk::IconSize Class Reference

Represents registered icon sizes. More...

`#include <gtkmm/enums.h>`

## Public Member Functions
| IconSize ()
| IconSize (BuiltinIconSize size)
| IconSize (int size)
| operator int () const

## Static Public Member Functions
static bool | lookup (IconSize size, int& width, int& height)
| Obtains the pixel size of a semantic icon size, possibly modified by user preferences for the default Gtk::Settings. More...

## Detailed Description

Represents registered icon sizes.

You can also use a Gtk::BuiltinIconSize instead of an IconSize.

## Constructor & Destructor Documentation

Gtk::IconSize::IconSize | ( |  | ) |
| inline

Gtk::IconSize::IconSize | ( | BuiltinIconSize | size | ) |
| inline

Gtk::IconSize::IconSize | ( | int | size | ) |
| inline explicit

## Member Function Documentation

static bool Gtk::IconSize::lookup | ( | IconSize | size,
|  | int & | width,
|  | int & | height
| ) |  |
| static

Obtains the pixel size of a semantic icon size, possibly modified by user preferences for the default Gtk::Settings.

Normally size would be Gtk::ICON_SIZE_MENU, Gtk::ICON_SIZE_BUTTON, etc. This function isn't normally needed because Gtk::Widget::render_icon() is the usual way to get an icon for rendering - then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by IconSize::lookup(), because themes are free to render the pixbuf however they like, including changing the usual size.

Parameters

  size | An icon size.
  width | Location to store icon width.
  height | Location to store icon height.

Returns
  true if size was a valid size.

Gtk::IconSize::operator int | ( |  | ) | const
| inline