CtkActor

## CtkActor CtkActor — The base widget class for Ctk style objects `include` ctk-actor.h |

## Synopsis

                        CtkActorPrivate;
                        CtkActor;
    void                ctk_actor_set_state                 (CtkActor *actor,
                                                             CtkActorState state);
    CtkActorState       ctk_actor_get_state                 (CtkActor *actor);
    void                ctk_actor_set_padding               (CtkActor *actor,
                                                             CtkPadding *padding);
    void                ctk_actor_get_padding               (CtkActor *actor,
                                                             CtkPadding *padding);
    GtkTextDirection    ctk_actor_get_default_direction     (void);
    void                ctk_actor_set_default_direction     (GtkTextDirection dir);
    void                ctk_actor_set_background            (CtkActor *actor,
                                                             ClutterActor *bg);
    ClutterActor *      ctk_actor_get_background            (CtkActor *actor);
    void                ctk_actor_set_background_for_state  (CtkActor *actor,
                                                             CtkActorState state,
                                                             ClutterActor *bg);
    ClutterActor *      ctk_actor_get_background_for_state  (CtkActor *actor,
                                                             CtkActorState state);
    void                ctk_actor_set_tooltip_text          (CtkActor *actor,
                                                             const gchar *self);
    const gchar *       ctk_actor_get_tooltip_text          (CtkActor *actor);
    void                ctk_actor_add_effect                (CtkActor *actor,
                                                             CtkEffect *effect);
    void                ctk_actor_remove_effect             (CtkActor *actor,
                                                             CtkEffect *effect);
    void                ctk_actor_remove_all_effects        (CtkActor *actor);
    GSList *            ctk_actor_get_effects               (CtkActor *actor);
    void                ctk_actor_set_effects_painting      (CtkActor *actor,
                                                             gboolean painting);
    gboolean            ctk_actor_get_effects_painting      (CtkActor *actor);
    void                ctk_actor_set_damaged               (CtkActor *actor,
                                                             gboolean damaged);
    gboolean            ctk_actor_get_damaged               (CtkActor *actor);
    void                ctk_actor_get_stored_allocation     (CtkActor *actor,
                                                             ClutterActorBox *box);
    void                ctk_actor_recurse_get_stored_allocation_box
                                                            (CtkActor *actor,
                                                             ClutterActorBox *box);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActor
                   +----CtkActor
                         +----CtkBox
                         +----CtkBin
                         +----CtkTooltip
                         +----CtkImage
                         +----CtkMenuSeperator
                         +----CtkIconView
                         +----CtkMenu

## Implemented Interfaces

CtkActor implements ClutterScriptable and CtkFocusable.

## Properties

      "background"               gpointer              : Read / Write
      "effects-painting"         gboolean              : Read / Write
      "focused"                  gboolean              : Read / Write
      "padding"                  CtkPadding*           : Read / Write
      "state"                    CtkActorState         : Read / Write
      "tooltip-text"             gchar*                : Read / Write

## Signals

      "child-focus-changed"                            : Run Last
      "drag-begin"                                     : Run Last
      "drag-data-delete"                               : Run Last
      "drag-data-get"                                  : Run Last
      "drag-data-received"                             : Run Last
      "drag-drop"                                      : Run Last
      "drag-end"                                       : Run Last
      "drag-failed"                                    : Run Last
      "drag-leave"                                     : Run Last
      "drag-motion"                                    : Run Last

## Description

A CtkActor is the base widget class for building Ctk style objects, it contains additional logic on top of ClutterActor for userinterface building

## Details

### CtkActorPrivate

    typedef struct _CtkActorPrivate CtkActorPrivate;

### CtkActor

    typedef struct _CtkActor CtkActor;

### ctk_actor_set_state ()

    void                ctk_actor_set_state                 (CtkActor *actor,
                                                             CtkActorState state);

Sets the state of `actor` !FIXME! flesh this out more

`actor` : | A CtkActor
`state` : | A CtkActorState

### ctk_actor_get_state ()

    CtkActorState       ctk_actor_get_state                 (CtkActor *actor);

gets the currently set CtkActorState for `actor`

`actor` : | A CtkActor
Returns : | a CtkActorState

### ctk_actor_set_padding ()

    void                ctk_actor_set_padding               (CtkActor *actor,
                                                             CtkPadding *padding);

Sets the padding of `actor` to `padding`

`actor` : | A CtkActor
`padding` : | A CtkPadding struct

### ctk_actor_get_padding ()

    void                ctk_actor_get_padding               (CtkActor *actor,
                                                             CtkPadding *padding);

Will return via `padding` the padding values of `actor` set by `ctk_actor_set_padding()`

`actor` : | A CtkActor
`padding` : | a CtkPadding struct to be filled with the return value

### ctk_actor_get_default_direction ()

    GtkTextDirection    ctk_actor_get_default_direction     (void);

Returns the default direction for all CtkActor widgets

Returns : | A GtkTextDirection object

### ctk_actor_set_default_direction ()

    void                ctk_actor_set_default_direction     (GtkTextDirection dir);

Sets the default direction for all CtkActor objects

`dir` : | A GtkTextDirection object

### ctk_actor_set_background ()

    void                ctk_actor_set_background            (CtkActor *actor,
                                                             ClutterActor *bg);

Sets the background for `actor` to `bg` Will fade out old background first if one exists

`actor` : | CtkActor
`bg` : | ClutterActor

### ctk_actor_get_background ()

    ClutterActor *      ctk_actor_get_background            (CtkActor *actor);

Gets the current background for `actor` as previously set by `ctk_actor_set_background()`

`actor` : | A CtkActor
Returns : | A ClutterActor

### ctk_actor_set_background_for_state ()

    void                ctk_actor_set_background_for_state  (CtkActor *actor,
                                                             CtkActorState state,
                                                             ClutterActor *bg);

Sets the background of `actor` for the given `state` !FIXME! - needs fleshing out more

`actor` : | A CtkActor
`state` : | A CtkActorState
`bg` : | A ClutterActor

### ctk_actor_get_background_for_state ()

    ClutterActor *      ctk_actor_get_background_for_state  (CtkActor *actor,
                                                             CtkActorState state);

Gets the current background for `actor` in the given `state` previously set by `ctk_actor_set_background_for_state()`

`actor` : | A CtkActor
`state` : | A CtkActorState
Returns : | a ClutterActor

### ctk_actor_set_tooltip_text ()

    void                ctk_actor_set_tooltip_text          (CtkActor *actor,
                                                             const gchar *self);

Sets the tooltip for `actor` to the contents of `tooltip_text`

`actor` : | A CtkActor
`self` : | a text string

### ctk_actor_get_tooltip_text ()

    const gchar *       ctk_actor_get_tooltip_text          (CtkActor *actor);

gets the tooltip text for `actor` previously set by `ctk_actor_set_tooltip_text()`

`actor` : | a CtkActor
Returns : | a string defining the tooltip text

### ctk_actor_add_effect ()

    void                ctk_actor_add_effect                (CtkActor *actor,
                                                             CtkEffect *effect);

Adds `effect` to the list of `actor`'s effects

`actor` : | a CtkActor
`effect` : | a CtkEffect

### ctk_actor_remove_effect ()

    void                ctk_actor_remove_effect             (CtkActor *actor,
                                                             CtkEffect *effect);

Remove `effect` from the list of effects attached to the `actor`

`actor` : | a CtkActor
`effect` : | a CtkEffect

### ctk_actor_remove_all_effects ()

    void                ctk_actor_remove_all_effects        (CtkActor *actor);

Remove all effets from the list of effects attached to the `actor`

`actor` : | a CtkActor

### ctk_actor_get_effects ()

    GSList *            ctk_actor_get_effects               (CtkActor *actor);

`actor` : | a CtkActor
Returns : | a GSList of CtkEffects. Do not modify or free the returned list.

### ctk_actor_set_effects_painting ()

    void                ctk_actor_set_effects_painting      (CtkActor *actor,
                                                             gboolean painting);

This function should be used by objects inheriting CtkActor, to stop parent paint functions from also painting any CtkEffects attached to `actor`.

In the same way, you should check for ctk_actor_get_effects_painting in your paint function before calling ctk_effect_paint.

`actor` : | a CtkActor
`painting` : | whether the `actor` is being painting be a CtkEffect

### ctk_actor_get_effects_painting ()

    gboolean            ctk_actor_get_effects_painting      (CtkActor *actor);

`actor` : | a CtkActor
Returns : | whether `actor` is currently being painting by an CtkEffect. See ctk_actor_set_effects_painting.

### ctk_actor_set_damaged ()

    void                ctk_actor_set_damaged               (CtkActor *actor,
                                                             gboolean damaged);

Sets the damaged value on `actor`, if the `damaged` is true then the actor will bubble up to its parent CtkActor, but stop at a non CtkActor

`actor` : | A CtkActor
`damaged` : | A Boolean value dicatating the state of damage

### ctk_actor_get_damaged ()

    gboolean            ctk_actor_get_damaged               (CtkActor *actor);

`actor` : | A CtkActor
Returns : | the damaged property of this CtkActor

### ctk_actor_get_stored_allocation ()

    void                ctk_actor_get_stored_allocation     (CtkActor *actor,
                                                             ClutterActorBox *box);

`actor` : | A CtkActor
`box` : | A ClutterAllocationBox. out.

### ctk_actor_recurse_get_stored_allocation_box ()

    void                ctk_actor_recurse_get_stored_allocation_box
                                                            (CtkActor *actor,
                                                             ClutterActorBox *box);

`actor` : | A CtkActor
`box` : | A ClutterAllocationBox. out.

## Property Details

### The `"background"` property

      "background"               gpointer              : Read / Write

Background.

### The `"effects-painting"` property

      "effects-painting"         gboolean              : Read / Write

Whether effects are controlling painting.

Default value: FALSE

### The `"focused"` property

      "focused"                  gboolean              : Read / Write

Whether the actor is currently in focus.

Default value: FALSE

### The `"padding"` property

      "padding"                  CtkPadding*           : Read / Write

Padding around an actor.

### The `"state"` property

      "state"                    CtkActorState         : Read / Write

The current state of the actor.

Default value: CTK_STATE_NORMAL

### The `"tooltip-text"` property

      "tooltip-text"             gchar*                : Read / Write

The contents of the tooltip for this widget.

Default value: NULL

## Signal Details

### The `"child-focus-changed"` signal

    void                user_function                      (CtkActor        *ctkactor,
                                                            ClutterActorBox *arg1,
                                                            gpointer         user_data)      : Run Last

`ctkactor` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The `"drag-begin"` signal

    void                user_function                      (CtkActor       *ctkactor,
                                                            GdkDragContext *arg1,
                                                            gpointer        user_data)      : Run Last

`ctkactor` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The `"drag-data-delete"` signal

    void                user_function                      (CtkActor       *ctkactor,
                                                            GdkDragContext *arg1,
                                                            gpointer        user_data)      : Run Last

`ctkactor` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The `"drag-data-get"` signal

    void                user_function                      (CtkActor         *ctkactor,
                                                            GdkDragContext   *arg1,
                                                            GtkSelectionData *arg2,
                                                            guint             arg3,
                                                            guint             arg4,
                                                            gpointer          user_data)      : Run Last

`ctkactor` : | the object which received the signal.
`arg1` : |
`arg2` : |
`arg3` : |
`arg4` : |
`user_data` : | user data set when the signal handler was connected.

### The `"drag-data-received"` signal

    void                user_function                      (CtkActor         *ctkactor,
                                                            GdkDragContext   *arg1,
                                                            gint              arg2,
                                                            gint              arg3,
                                                            GtkSelectionData *arg4,
                                                            guint             arg5,
                                                            guint             arg6,
                                                            gpointer          user_data)      : Run Last

`ctkactor` : | the object which received the signal.
`arg1` : |
`arg2` : |
`arg3` : |
`arg4` : |
`arg5` : |
`arg6` : |
`user_data` : | user data set when the signal handler was connected.

### The `"drag-drop"` signal

    gboolean            user_function                      (CtkActor       *ctkactor,
                                                            GdkDragContext *arg1,
                                                            gint            arg2,
                                                            gint            arg3,
                                                            guint           arg4,
                                                            gpointer        user_data)      : Run Last

`ctkactor` : | the object which received the signal.
`arg1` : |
`arg2` : |
`arg3` : |
`arg4` : |
`user_data` : | user data set when the signal handler was connected.
Returns : |

### The `"drag-end"` signal

    void                user_function                      (CtkActor       *ctkactor,
                                                            GdkDragContext *arg1,
                                                            gpointer        user_data)      : Run Last

`ctkactor` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The `"drag-failed"` signal

    gboolean            user_function                      (CtkActor       *ctkactor,
                                                            GdkDragContext *arg1,
                                                            GtkDragResult   arg2,
                                                            gpointer        user_data)      : Run Last

`ctkactor` : | the object which received the signal.
`arg1` : |
`arg2` : |
`user_data` : | user data set when the signal handler was connected.
Returns : |

### The `"drag-leave"` signal

    void                user_function                      (CtkActor       *ctkactor,
                                                            GdkDragContext *arg1,
                                                            guint           arg2,
                                                            gpointer        user_data)      : Run Last

`ctkactor` : | the object which received the signal.
`arg1` : |
`arg2` : |
`user_data` : | user data set when the signal handler was connected.

### The `"drag-motion"` signal

    gboolean            user_function                      (CtkActor       *ctkactor,
                                                            GdkDragContext *arg1,
                                                            gint            arg2,
                                                            gint            arg3,
                                                            guint           arg4,
                                                            gpointer        user_data)      : Run Last

`ctkactor` : | the object which received the signal.
`arg1` : |
`arg2` : |
`arg3` : |
`arg4` : |
`user_data` : | user data set when the signal handler was connected.
Returns : |