## mx-types mx-types — type definitions used throughout Mx |

## Synopsis

    struct              MxBorderImage;
    struct              MxPadding;
    #define             MX_PARAM_TRANSLATEABLE
    void                mx_border_image_set_from_string     (GValue *value,
                                                             const gchar *str,
                                                             const gchar *filename);
    void                mx_font_weight_set_from_string      (GValue *value,
                                                             const gchar *str);
    enum                MxAlign;
    enum                MxFontWeight;
    enum                MxScrollPolicy;
    enum                MxOrientation;
    enum                MxWindowRotation;
    enum                MxPosition;
    enum                MxImageScaleMode;
    enum                MxTooltipAnimation;

## Object Hierarchy

      GBoxed
       +----MxBorderImage

      GBoxed
       +----MxPadding

## Description

Common types for MxWidgets.

## Details

### struct MxBorderImage

    struct MxBorderImage;

### struct MxPadding

    struct MxPadding;

The padding from the internal border of the parent container.

### MX_PARAM_TRANSLATEABLE

    #define MX_PARAM_TRANSLATEABLE 1 << 8

### mx_border_image_set_from_string ()

    void                mx_border_image_set_from_string     (GValue *value,
                                                             const gchar *str,
                                                             const gchar *filename);

### mx_font_weight_set_from_string ()

    void                mx_font_weight_set_from_string      (GValue *value,
                                                             const gchar *str);

### enum MxAlign

    typedef enum { /*< prefix=MX_ALIGN >*/
      MX_ALIGN_START,
      MX_ALIGN_MIDDLE,
      MX_ALIGN_END
    } MxAlign;

Set the alignment of the item

`MX_ALIGN_START` | Align at the beginning of the axis
`MX_ALIGN_MIDDLE` | Align in the middle of the axis
`MX_ALIGN_END` | Align at the end of the axis

### enum MxFontWeight

    typedef enum /*< prefix=MX_FONT_WEIGHT >*/
    {
      MX_FONT_WEIGHT_NORMAL,
      MX_FONT_WEIGHT_BOLD,
      MX_FONT_WEIGHT_BOLDER,
      MX_FONT_WEIGHT_LIGHTER
    } MxFontWeight;

Support values of font weight

`MX_FONT_WEIGHT_NORMAL` | Normal font weight
`MX_FONT_WEIGHT_BOLD` | Bold font weight
`MX_FONT_WEIGHT_BOLDER` | Bolder font weight
`MX_FONT_WEIGHT_LIGHTER` | Lighter font weight

### enum MxScrollPolicy

    typedef enum /*< prefix=MX_SCROLL_POLICY >*/
    {
      MX_SCROLL_POLICY_NONE,
      MX_SCROLL_POLICY_HORIZONTAL,
      MX_SCROLL_POLICY_VERTICAL,
      MX_SCROLL_POLICY_BOTH
    } MxScrollPolicy;

Defines the scrolling policy of scrollable widgets.

`MX_SCROLL_POLICY_NONE` | Never scroll
`MX_SCROLL_POLICY_HORIZONTAL` | Only allow horizontal scrolling
`MX_SCROLL_POLICY_VERTICAL` | Only allow vertical scrolling
`MX_SCROLL_POLICY_BOTH` | Allow scrolling both horizontally and vertically

### enum MxOrientation

    typedef enum /*< prefix=MX_ORIENTATION >*/
    {
      MX_ORIENTATION_HORIZONTAL,
      MX_ORIENTATION_VERTICAL
    } MxOrientation;

Defines the orientation of various layout widgets.

`MX_ORIENTATION_HORIZONTAL` | horizontal orientation
`MX_ORIENTATION_VERTICAL` | vertical orientation

### enum MxWindowRotation

    typedef enum /*< prefix=MX_WINDOW_ROTATION >*/
    {
      MX_WINDOW_ROTATION_0,
      MX_WINDOW_ROTATION_90,
      MX_WINDOW_ROTATION_180,
      MX_WINDOW_ROTATION_270
    } MxWindowRotation;

Defines the clock-wise rotation angle of a window.

`MX_WINDOW_ROTATION_0` | Zero degrees of rotation
`MX_WINDOW_ROTATION_90` | 90 degrees of rotation
`MX_WINDOW_ROTATION_180` | 180 degrees of rotation
`MX_WINDOW_ROTATION_270` | 270 degrees of rotation

Since 1.2

### enum MxPosition

    typedef enum /*< prefix=MX_POSITION >*/
    {
      MX_POSITION_TOP,
      MX_POSITION_RIGHT,
      MX_POSITION_BOTTOM,
      MX_POSITION_LEFT
    } MxPosition;

Defines the position of an interface element.

`MX_POSITION_TOP` | The top position
`MX_POSITION_RIGHT` | The right position
`MX_POSITION_BOTTOM` | The bottom position
`MX_POSITION_LEFT` | The left position

Since 1.2

### enum MxImageScaleMode

    typedef enum /*< prefix=MX_IMAGE_SCALE >*/
    {
      MX_IMAGE_SCALE_NONE,
      MX_IMAGE_SCALE_FIT,
      MX_IMAGE_SCALE_CROP
    } MxImageScaleMode;

Defines the scaling mode of an image.

`MX_IMAGE_SCALE_NONE` | Do not apply any scaling and center the image within the allocation
`MX_IMAGE_SCALE_FIT` | Scale the image, but maintain the aspect ratio so that it fits exactly within the allocation
`MX_IMAGE_SCALE_CROP` | Scale and crop the image so that it covers the entire allocation while retaining the correct aspect ratio

### enum MxTooltipAnimation

    typedef enum /*< prefix=MX_TOOLTIP_ANIMATION >*/
    {
      MX_TOOLTIP_ANIMATION_BOUNCE,
      MX_TOOLTIP_ANIMATION_FADE
    } MxTooltipAnimation;

Defines the animation when tooltips are shown and hidden.

`MX_TOOLTIP_ANIMATION_BOUNCE` | Bounce the tooltips when they appear
`MX_TOOLTIP_ANIMATION_FADE` | Fade the tooltips on show and hide

Since 1.2