gtkmm 4.7.1

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gdk::ToplevelLayout Class Referencefinal

Information for presenting toplevels. More...

`#include <gdkmm/toplevellayout.h>`

## Public Member Functions
void | reference () const
| Increment the reference count for this object. More...
void | unreference () const
| Decrement the reference count for this object. More...
GdkToplevelLayout * | gobj ()
| Provides access to the underlying C instance. More...
const GdkToplevelLayout * | gobj () const
| Provides access to the underlying C instance. More...
GdkToplevelLayout * | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
| ToplevelLayout ()=delete
| ToplevelLayout (const ToplevelLayout &)=delete
ToplevelLayout & | operator= (const ToplevelLayout &)=delete
Glib::RefPtr< ToplevelLayout > | copy () const
| Create a new `Gdk::ToplevelLayout` and copy the contents of layout into it. More...
bool | equal (const Glib::RefPtr< const ToplevelLayout > & other) const
| Check whether layout and other has identical layout properties. More...
void | set_maximized (bool maximized=true)
| Sets whether the layout should cause the surface to be maximized when presented. More...
void | set_fullscreen (bool fullscreen=true, const Glib::RefPtr< Monitor > & monitor={})
| Sets whether the layout should cause the surface to be fullscreen when presented. More...
bool | get_maximized (bool & maximized) const
| If the layout specifies whether to the toplevel should go maximized, the value pointed to by maximized is set to `true` if it should go fullscreen, or `false`, if it should go unmaximized. More...
bool | get_fullscreen (bool & fullscreen) const
| If the layout specifies whether to the toplevel should go fullscreen, the value pointed to by fullscreen is set to `true` if it should go fullscreen, or `false`, if it should go unfullscreen. More...
Glib::RefPtr< Monitor > | get_fullscreen_monitor ()
| Returns the monitor that the layout is fullscreening the surface on. More...
Glib::RefPtr< const Monitor > | get_fullscreen_monitor () const
| Returns the monitor that the layout is fullscreening the surface on. More...
void | set_resizable (bool resizable=true)
| Sets whether the layout should allow the user to resize the surface after it has been presented. More...
bool | get_resizable () const
| Returns whether the layout should allow the user to resize the surface. More...

## Static Public Member Functions
static Glib::RefPtr< ToplevelLayout > | create ()
| Create a toplevel layout description. More...

## Protected Member Functions
void | operator delete (void *, std::size_t)

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

## Detailed Description

Information for presenting toplevels.

Toplevel surfaces are sovereign windows that can be presented to the user in various states (maximized, on all workspaces, etc).

The Gdk::ToplevelLayout class contains information that is necessary to do so, and is passed to Gdk::Toplevel::present().

Since gtkmm 3.98:

## Constructor & Destructor Documentation

## ◆ ToplevelLayout() [1/2]

Gdk::ToplevelLayout::ToplevelLayout | ( |  | ) |
| delete

## ◆ ToplevelLayout() [2/2]

Gdk::ToplevelLayout::ToplevelLayout | ( | const ToplevelLayout & |  | ) |
| delete

## Member Function Documentation

## ◆ copy()

Glib::RefPtr<ToplevelLayout> Gdk::ToplevelLayout::copy | ( |  | ) | const

Create a new `Gdk::ToplevelLayout` and copy the contents of layout into it.

Returns
  A copy of layout.

## ◆ create()

static Glib::RefPtr<ToplevelLayout> Gdk::ToplevelLayout::create | ( |  | ) |
| static

Create a toplevel layout description.

Used together with present() to describe how a toplevel surface should be placed and behave on-screen.

The size is in ”application pixels”, not ”device pixels” (see Gdk::Surface::get_scale_factor()).

Returns
  Newly created instance of `Gdk::ToplevelLayout`.

## ◆ equal()

bool Gdk::ToplevelLayout::equal | ( | const Glib::RefPtr< const ToplevelLayout > & | other | ) | const

Check whether layout and other has identical layout properties.

Parameters

  other | Another `Gdk::ToplevelLayout`.

Returns
  `true` if layout and other have identical layout properties, otherwise `false`.

## ◆ get_fullscreen()

bool Gdk::ToplevelLayout::get_fullscreen | ( | bool & | fullscreen | ) | const

If the layout specifies whether to the toplevel should go fullscreen, the value pointed to by fullscreen is set to `true` if it should go fullscreen, or `false`, if it should go unfullscreen.

Parameters

  fullscreen | Location to store whether the toplevel should be fullscreen.

Returns
  Whether the layout specifies the fullscreen state for the toplevel.

## ◆ get_fullscreen_monitor() [1/2]

Glib::RefPtr<Monitor> Gdk::ToplevelLayout::get_fullscreen_monitor | ( |  | ) |

Returns the monitor that the layout is fullscreening the surface on.

Returns
  The monitor on which layout fullscreens.

## ◆ get_fullscreen_monitor() [2/2]

Glib::RefPtr<const Monitor> Gdk::ToplevelLayout::get_fullscreen_monitor | ( |  | ) | const

Returns the monitor that the layout is fullscreening the surface on.

Returns
  The monitor on which layout fullscreens.

## ◆ get_maximized()

bool Gdk::ToplevelLayout::get_maximized | ( | bool & | maximized | ) | const

If the layout specifies whether to the toplevel should go maximized, the value pointed to by maximized is set to `true` if it should go fullscreen, or `false`, if it should go unmaximized.

Parameters

  maximized | Set to `true` if the toplevel should be maximized.

Returns
  Whether the layout specifies the maximized state for the toplevel.

## ◆ get_resizable()

bool Gdk::ToplevelLayout::get_resizable | ( |  | ) | const

Returns whether the layout should allow the user to resize the surface.

Returns
  `true` if the layout is resizable.

## ◆ gobj() [1/2]

GdkToplevelLayout* Gdk::ToplevelLayout::gobj | ( |  | ) |

Provides access to the underlying C instance.

## ◆ gobj() [2/2]

const GdkToplevelLayout* Gdk::ToplevelLayout::gobj | ( |  | ) | const

Provides access to the underlying C instance.

## ◆ gobj_copy()

GdkToplevelLayout* Gdk::ToplevelLayout::gobj_copy | ( |  | ) | const

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

## ◆ operator delete()

void Gdk::ToplevelLayout::operator delete | ( | void * | ,
|  | std::size_t |
| ) |  |
| protected

## ◆ operator=()

ToplevelLayout& Gdk::ToplevelLayout::operator= | ( | const ToplevelLayout & |  | ) |
| delete

## ◆ reference()

void Gdk::ToplevelLayout::reference | ( |  | ) | const

Increment the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

## ◆ set_fullscreen()

void Gdk::ToplevelLayout::set_fullscreen | ( | bool | fullscreen = `true`,
|  | const Glib::RefPtr< Monitor > & | monitor = `{}`
| ) |  |

Sets whether the layout should cause the surface to be fullscreen when presented.

Parameters

  fullscreen | `true` to fullscreen the surface.
  monitor | The monitor to fullscreen on.

## ◆ set_maximized()

void Gdk::ToplevelLayout::set_maximized | ( | bool | maximized = `true` | ) |

Sets whether the layout should cause the surface to be maximized when presented.

Parameters

  maximized | `true` to maximize.

## ◆ set_resizable()

void Gdk::ToplevelLayout::set_resizable | ( | bool | resizable = `true` | ) |

Sets whether the layout should allow the user to resize the surface after it has been presented.

Parameters

  resizable | `true` to allow resizing.

## ◆ unreference()

void Gdk::ToplevelLayout::unreference | ( |  | ) | const

Decrement the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

## Friends And Related Function Documentation

## ◆ wrap()

Glib::RefPtr< Gdk::ToplevelLayout > wrap | ( | GdkToplevelLayout * | 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.