marco 1.29.1
Window manager
Loading...
Searching...
No Matches
_MetaFrameLayout Struct Reference

Various parameters used to calculate the geometry of a frame. More...

#include <src/ui/theme.h>

Data Fields

int refcount
 Reference count.
 
int left_width
 Size of left side.
 
int right_width
 Size of right side.
 
int bottom_height
 Size of bottom side.
 
GtkBorder invisible_resize_border
 
GtkBorder title_border
 Border of blue title region.
 
int title_vertical_pad
 Extra height for inside of title region, above the font height.
 
int right_titlebar_edge
 Right indent of buttons from edges of frame.
 
int left_titlebar_edge
 Left indent of buttons from edges of frame.
 
MetaButtonSizing button_sizing
 Sizing rule of buttons, either META_BUTTON_SIZING_ASPECT (in which case button_aspect will be honoured, and button_width and button_height set from it), or META_BUTTON_SIZING_FIXED (in which case we read the width and height directly).
 
double button_aspect
 Ratio of height/width.
 
int button_width
 Width of a button; set even when we are using aspect sizing.
 
int button_height
 Height of a button; set even when we are using aspect sizing.
 
GtkBorder button_border
 Space around buttons.
 
double title_scale
 scale factor for title text
 
guint has_title: 1
 Whether title text will be displayed.
 
guint hide_buttons: 1
 Whether we should hide the buttons.
 
guint top_left_corner_rounded_radius
 Radius of the top left-hand corner; 0 if not rounded.
 
guint top_right_corner_rounded_radius
 Radius of the top right-hand corner; 0 if not rounded.
 
guint bottom_left_corner_rounded_radius
 Radius of the bottom left-hand corner; 0 if not rounded.
 
guint bottom_right_corner_rounded_radius
 Radius of the bottom right-hand corner; 0 if not rounded.
 

Detailed Description

Various parameters used to calculate the geometry of a frame.

They are used inside a MetaFrameStyle. This corresponds closely to the <frame_geometry> tag in a theme file.

Bug:
button_sizing isn't really necessary, because we could easily say that if button_aspect is zero, the height and width are fixed values. This would also mean that MetaButtonSizing didn't need to exist, and save code.

Field Documentation

◆ bottom_height

int _MetaFrameLayout::bottom_height

◆ bottom_left_corner_rounded_radius

guint _MetaFrameLayout::bottom_left_corner_rounded_radius

Radius of the bottom left-hand corner; 0 if not rounded.

Referenced by meta_frame_layout_calc_geometry(), meta_preview_get_clip_region(), and parse_toplevel_element().

◆ bottom_right_corner_rounded_radius

guint _MetaFrameLayout::bottom_right_corner_rounded_radius

Radius of the bottom right-hand corner; 0 if not rounded.

Referenced by meta_frame_layout_calc_geometry(), meta_preview_get_clip_region(), and parse_toplevel_element().

◆ button_aspect

double _MetaFrameLayout::button_aspect

Ratio of height/width.

Honoured only if button_sizing==META_BUTTON_SIZING_ASPECT. Otherwise we figure out the height from the button_border.

Referenced by meta_frame_layout_calc_geometry(), meta_frame_layout_new(), meta_frame_layout_validate(), and parse_aspect_ratio().

◆ button_border

GtkBorder _MetaFrameLayout::button_border

◆ button_height

int _MetaFrameLayout::button_height

Height of a button; set even when we are using aspect sizing.

Referenced by meta_frame_layout_calc_geometry(), meta_frame_layout_get_borders(), meta_frame_layout_new(), and parse_distance().

◆ button_sizing

MetaButtonSizing _MetaFrameLayout::button_sizing

Sizing rule of buttons, either META_BUTTON_SIZING_ASPECT (in which case button_aspect will be honoured, and button_width and button_height set from it), or META_BUTTON_SIZING_FIXED (in which case we read the width and height directly).

Referenced by meta_frame_layout_calc_geometry(), meta_frame_layout_new(), meta_frame_layout_validate(), parse_aspect_ratio(), and parse_distance().

◆ button_width

int _MetaFrameLayout::button_width

Width of a button; set even when we are using aspect sizing.

Referenced by meta_frame_layout_calc_geometry(), meta_frame_layout_new(), and parse_distance().

◆ has_title

guint _MetaFrameLayout::has_title

Whether title text will be displayed.

Referenced by meta_frame_layout_get_borders(), meta_frame_layout_new(), and parse_toplevel_element().

◆ hide_buttons

guint _MetaFrameLayout::hide_buttons

Whether we should hide the buttons.

Referenced by meta_frame_layout_calc_geometry(), and parse_toplevel_element().

◆ invisible_resize_border

GtkBorder _MetaFrameLayout::invisible_resize_border

◆ left_titlebar_edge

int _MetaFrameLayout::left_titlebar_edge

Left indent of buttons from edges of frame.

Referenced by meta_frame_layout_calc_geometry(), meta_frame_layout_new(), and parse_distance().

◆ left_width

int _MetaFrameLayout::left_width

◆ refcount

int _MetaFrameLayout::refcount

◆ right_titlebar_edge

int _MetaFrameLayout::right_titlebar_edge

Right indent of buttons from edges of frame.

Referenced by meta_frame_layout_calc_geometry(), meta_frame_layout_new(), and parse_distance().

◆ right_width

int _MetaFrameLayout::right_width

◆ title_border

GtkBorder _MetaFrameLayout::title_border

◆ title_scale

double _MetaFrameLayout::title_scale

scale factor for title text

Referenced by meta_frame_layout_new(), meta_theme_get_title_scale(), and parse_toplevel_element().

◆ title_vertical_pad

int _MetaFrameLayout::title_vertical_pad

Extra height for inside of title region, above the font height.

Referenced by meta_frame_layout_get_borders(), meta_frame_layout_new(), and parse_distance().

◆ top_left_corner_rounded_radius

guint _MetaFrameLayout::top_left_corner_rounded_radius

Radius of the top left-hand corner; 0 if not rounded.

Referenced by meta_frame_layout_calc_geometry(), meta_preview_get_clip_region(), and parse_toplevel_element().

◆ top_right_corner_rounded_radius

guint _MetaFrameLayout::top_right_corner_rounded_radius

Radius of the top right-hand corner; 0 if not rounded.

Referenced by meta_frame_layout_calc_geometry(), meta_preview_get_clip_region(), and parse_toplevel_element().


The documentation for this struct was generated from the following file: