gtkmm 4.16.0
|
Information for computing toplevel size. More...
#include <gdkmm/toplevelsize.h>
Public Member Functions | |
ToplevelSize (GdkToplevelSize *gobject) | |
ToplevelSize (const ToplevelSize &other)=delete | |
ToplevelSize & | operator= (const ToplevelSize &other)=delete |
ToplevelSize (ToplevelSize &&other) noexcept | |
ToplevelSize & | operator= (ToplevelSize &&other) noexcept |
~ToplevelSize () noexcept | |
operator bool () const | |
Checks if this instance is valid. | |
GdkToplevelSize * | gobj () |
Provides access to the underlying C object. | |
const GdkToplevelSize * | gobj () const |
Provides access to the underlying C object. | |
void | get_bounds (int &bounds_width, int &bounds_height) const |
Retrieves the bounds the toplevel is placed within. | |
void | set_size (int width, int height) |
Sets the size the toplevel prefers to be resized to. | |
void | set_min_size (int min_width, int min_height) |
Sets the minimum size of the toplevel. | |
void | set_shadow_width (int left, int right, int top, int bottom) |
Sets the shadows size of the toplevel. | |
Protected Attributes | |
GdkToplevelSize * | gobject_ |
Information for computing toplevel size.
The Gdk::ToplevelSize struct contains information that may be useful for users of Gdk::Toplevel to compute a surface size. It also carries information back with the computational result.
|
explicit |
|
delete |
|
noexcept |
|
noexcept |
void Gdk::ToplevelSize::get_bounds | ( | int & | bounds_width, |
int & | bounds_height | ||
) | const |
Retrieves the bounds the toplevel is placed within.
The bounds represent the largest size a toplevel may have while still being able to fit within some type of boundary. Depending on the backend, this may be equivalent to the dimensions of the work area or the monitor on which the window is being presented on, or something else that limits the way a toplevel can be presented.
bounds_width | Return location for width. |
bounds_height | Return location for height. |
|
inline |
Provides access to the underlying C object.
|
inline |
Provides access to the underlying C object.
|
explicit |
|
delete |
|
noexcept |
void Gdk::ToplevelSize::set_min_size | ( | int | min_width, |
int | min_height | ||
) |
Sets the minimum size of the toplevel.
The minimum size corresponds to the limitations the toplevel can be shrunk to, without resulting in incorrect painting. A user of a Gdk::Toplevel
should calculate these given both the existing size, and the bounds retrieved from the Gdk::ToplevelSize
object.
The minimum size should be within the bounds (see get_bounds()).
min_width | The minimum width. |
min_height | The minimum height. |
void Gdk::ToplevelSize::set_shadow_width | ( | int | left, |
int | right, | ||
int | top, | ||
int | bottom | ||
) |
Sets the shadows size of the toplevel.
The shadow width corresponds to the part of the computed surface size that would consist of the shadow margin surrounding the window, would there be any.
Shadow width should only be set if Gtk::Display::supports_shadow_width() is true
.
left | Width of the left part of the shadow. |
right | Width of the right part of the shadow. |
top | Height of the top part of the shadow. |
bottom | Height of the bottom part of the shadow. |
void Gdk::ToplevelSize::set_size | ( | int | width, |
int | height | ||
) |
Sets the size the toplevel prefers to be resized to.
The size should be within the bounds (see get_bounds()). The set size should be considered as a hint, and should not be assumed to be respected by the windowing system, or backend.
width | The width. |
height | The height. |
|
protected |