gtkmm 4.16.0
|
Information for presenting popups. More...
#include <gdkmm/popuplayout.h>
Public Member Functions | |
void | reference () const |
Increment the reference count for this object. | |
void | unreference () const |
Decrement the reference count for this object. | |
GdkPopupLayout * | gobj () |
Provides access to the underlying C instance. | |
const GdkPopupLayout * | gobj () const |
Provides access to the underlying C instance. | |
GdkPopupLayout * | gobj_copy () const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
PopupLayout ()=delete | |
PopupLayout (const PopupLayout &)=delete | |
PopupLayout & | operator= (const PopupLayout &)=delete |
Glib::RefPtr< PopupLayout > | copy () const |
Makes a copy of layout. | |
bool | equal (const Glib::RefPtr< const PopupLayout > &other) const |
Check whether layout and other has identical layout properties. | |
void | set_anchor_rect (const Rectangle &anchor_rect) |
Set the anchor rectangle. | |
Rectangle | get_anchor_rect () const |
Get the anchor rectangle. | |
void | set_rect_anchor (Gravity anchor) |
Set the anchor on the anchor rectangle. | |
Gravity | get_rect_anchor () const |
Returns the anchor position on the anchor rectangle. | |
void | set_surface_anchor (Gravity anchor) |
Set the anchor on the popup surface. | |
Gravity | get_surface_anchor () const |
Returns the anchor position on the popup surface. | |
void | set_anchor_hints (AnchorHints anchor_hints) |
Set new anchor hints. | |
AnchorHints | get_anchor_hints () const |
Get the Gdk::AnchorHints . | |
void | set_offset (int dx, int dy) |
Offset the position of the anchor rectangle with the given delta. | |
void | get_offset (int &dx, int &dy) |
Retrieves the offset for the anchor rectangle. | |
void | set_shadow_width (int left, int right, int top, int bottom) |
Sets the shadow width of the popup. | |
void | set_shadow_width (int width) |
Sets the shadow width of the popup. | |
void | get_shadow_width (int &left, int &right, int & top, int &bottom) const |
Obtains the shadow widths of this layout. | |
Static Public Member Functions | |
static Glib::RefPtr< PopupLayout > | create (const Rectangle &anchor_rect, Gravity rect_anchor, Gravity surface_anchor) |
Create a popup layout description. | |
Protected Member Functions | |
void | operator delete (void *, std::size_t) |
Related Symbols | |
(Note that these are not member symbols.) | |
Glib::RefPtr< Gdk::PopupLayout > | wrap (GdkPopupLayout *object, bool take_copy=false) |
A Glib::wrap() method for this object. | |
Information for presenting popups.
Popups are positioned relative to their parent surface. The Gdk::PopupLayout class contains information that is necessary to do so.
|
delete |
|
delete |
Glib::RefPtr< PopupLayout > Gdk::PopupLayout::copy | ( | ) | const |
Makes a copy of layout.
|
static |
Create a popup layout description.
Used together with present() to describe how a popup surface should be placed and behave on-screen.
anchor_rect is relative to the top-left corner of the surface's parent. rect_anchor and surface_anchor determine anchor points on anchor_rect and surface to pin together.
The position of anchor_rect's anchor point can optionally be offset using set_offset(), which is equivalent to offsetting the position of surface.
anchor_rect | The anchor Gdk::Rectangle to align surface with. |
rect_anchor | The point on anchor_rect to align with surface's anchor point. |
surface_anchor | The point on surface to align with rect's anchor point. |
Gdk::PopupLayout
. bool Gdk::PopupLayout::equal | ( | const Glib::RefPtr< const PopupLayout > & | other | ) | const |
Check whether layout and other has identical layout properties.
other | Another Gdk::PopupLayout . |
true
if layout and other have identical layout properties, otherwise false
. AnchorHints Gdk::PopupLayout::get_anchor_hints | ( | ) | const |
Get the Gdk::AnchorHints
.
Gdk::AnchorHints
. Rectangle Gdk::PopupLayout::get_anchor_rect | ( | ) | const |
Get the anchor rectangle.
void Gdk::PopupLayout::get_offset | ( | int & | dx, |
int & | dy | ||
) |
Retrieves the offset for the anchor rectangle.
dx | Return location for the delta X coordinate. |
dy | Return location for the delta Y coordinate. |
Gravity Gdk::PopupLayout::get_rect_anchor | ( | ) | const |
Returns the anchor position on the anchor rectangle.
void Gdk::PopupLayout::get_shadow_width | ( | int & | left, |
int & | right, | ||
int & | top, | ||
int & | bottom | ||
) | const |
Obtains the shadow widths of this layout.
left | Return location for the left shadow width. |
right | Return location for the right shadow width. |
top | Return location for the top shadow width. |
bottom | Return location for the bottom shadow width. |
Gravity Gdk::PopupLayout::get_surface_anchor | ( | ) | const |
Returns the anchor position on the popup surface.
GdkPopupLayout * Gdk::PopupLayout::gobj | ( | ) |
Provides access to the underlying C instance.
const GdkPopupLayout * Gdk::PopupLayout::gobj | ( | ) | const |
Provides access to the underlying C instance.
GdkPopupLayout * Gdk::PopupLayout::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
|
delete |
void Gdk::PopupLayout::reference | ( | ) | const |
Increment the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
void Gdk::PopupLayout::set_anchor_hints | ( | AnchorHints | anchor_hints | ) |
Set new anchor hints.
The set anchor_hints determines how surface will be moved if the anchor points cause it to move off-screen. For example, Gdk::AnchorHints::FLIP_X will replace Gdk::Gravity::NORTH_WEST with Gdk::Gravity::NORTH_EAST and vice versa if surface extends beyond the left or right edges of the monitor.
anchor_hints | The new Gdk::AnchorHints . |
Set the anchor rectangle.
anchor_rect | The new anchor rectangle. |
void Gdk::PopupLayout::set_offset | ( | int | dx, |
int | dy | ||
) |
Offset the position of the anchor rectangle with the given delta.
dx | X delta to offset the anchor rectangle with. |
dy | Y delta to offset the anchor rectangle with. |
Set the anchor on the anchor rectangle.
anchor | The new rect anchor. |
void Gdk::PopupLayout::set_shadow_width | ( | int | left, |
int | right, | ||
int | top, | ||
int | bottom | ||
) |
Sets the shadow width of the popup.
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.
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::PopupLayout::set_shadow_width | ( | int | width | ) |
Sets the shadow width of the popup.
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.
width | Width of all parts of the shadow. |
Set the anchor on the popup surface.
anchor | The new popup surface anchor. |
void Gdk::PopupLayout::unreference | ( | ) | const |
Decrement the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
|
related |
A Glib::wrap() method for this object.
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. |