MildenhallRatingBottomBar

MildenhallRatingBottomBar — MildenhallRatingBottomBar is a container which can be used as a bottom bar.

Functions

ClutterActor * mildenhall_rating_bottom_bar_new ()

Properties

gchar * background-color Read / Write
gfloat height Read / Write
gboolean is-rating Write
gchar * left-bottom-text-color Read / Write
gchar * left-bottom-text-font Read / Write
GObject * model Read / Write
gchar * right-text-color Read / Write
gchar * right-text-font Read / Write
gboolean swap Write
gfloat width Read / Write

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── MildenhallRatingBottomBar

Description

MildenhallRatingBottomBar widget can be used as bottom bar with fields including Left-Top-Field: Ratings-stars / Text Left-Bottom-Field: Text ( Font and Color can be customized ) Right-field: Text ( Font and Color can be customized )

Freeing the widget

Call g_object_unref() to free the widget.

Sample C Code

A private enum to set column of ThornburyModel

1
2
3
4
5
6
7
8
enum
{
  RATING_BOTTOM_BAR_MODEL_COL_0_RATINGS,
  RATING_BOTTOM_BAR_MODEL_COL_1_LEFT_BOTTOM_TEXT,
  RATING_BOTTOM_BAR_MODEL_COL_2_RIGHT_TEXT,
  RATING_BOTTOM_BAR_MODEL_COL_3_LEFT_TOP_TEXT,
  RATING_BOTTOM_BAR_MODEL_COLUMN_LAST
};

How to create MildenhallRatingBottomBar

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
ThornburyItemFactory *item_factory = NULL;
GObject *object = NULL;
MildenhallRatingBottomBar *toggle = NULL;
ClutterActor *button = NULL;
ThornburyModel *model = NULL;

item_factory = thornbury_item_factory_generate_widget_with_props (
MILDENHALL_TYPE_RATING_BOTTOM_BAR,
"/usr/share/mildenhall/mildenhall_rating_bottom_bar_prop.json");

g_object_get (item_factory, "object", &object, NULL);
toggle = MILDENHALL_RATING_BOTTOM_BAR(object);
button = CLUTTER_ACTOR (toggle);

model = (ThornburyModel*) thornbury_list_model_new (
RATING_BOTTOM_BAR_MODEL_COLUMN_LAST, G_TYPE_INT, 0, G_TYPE_STRING, NULL,
G_TYPE_STRING, NULL, G_TYPE_STRING, NULL, -1);

thornbury_model_append (model, RATING_BOTTOM_BAR_MODEL_COL_0_RATINGS, 9,
                       RATING_BOTTOM_BAR_MODEL_COL_1_LEFT_BOTTOM_TEXT,
                       "3 ratings added to this widget",
                       RATING_BOTTOM_BAR_MODEL_COL_2_RIGHT_TEXT,
                       "the cost of the widget is approx 55 $",
                       RATING_BOTTOM_BAR_MODEL_COL_3_LEFT_TOP_TEXT,
                       "no of stars", -1);

g_object_set (button, "model", model, NULL);
clutter_actor_add_child (stage, button);

Functions

mildenhall_rating_bottom_bar_new ()

ClutterActor *
mildenhall_rating_bottom_bar_new (void);

Creates a new MildenhallRatingBottomBar

Returns

ClutterActor.

[transfer full]

Types and Values

Property Details

The “background-color” property

  “background-color”         gchar *

background color for the entire widget.

Flags: Read / Write

Default value: NULL


The “height” property

  “height”                   gfloat

Height of the Rating Bottom Bar.

Flags: Read / Write

Allowed values: >= 0

Default value: 0


The “is-rating” property

  “is-rating”                gboolean

Whether the actor on left top corner is Ratings or Text.

Flags: Write

Default value: FALSE


The “left-bottom-text-color” property

  “left-bottom-text-color”   gchar *

color for the text in left-bottom side.

Flags: Read / Write

Default value: NULL


The “left-bottom-text-font” property

  “left-bottom-text-font”    gchar *

font type for the text in left-bottom side.

Flags: Read / Write

Default value: NULL


The “model” property

  “model”                    GObject *

Model information of Rating Bottom Bar widget.

Flags: Read / Write


The “right-text-color” property

  “right-text-color”         gchar *

right-text-color Default: 98A9B300

Flags: Read / Write

Default value: NULL


The “right-text-font” property

  “right-text-font”          gchar *

right-text-font Default: DejaVuSansCondensed 28px

Flags: Read / Write

Default value: NULL


The “swap” property

  “swap”                     gboolean

swap view by 180 degree.

Flags: Write

Default value: FALSE


The “width” property

  “width”                    gfloat

Width of the Rating Bottom Bar.

Flags: Read / Write

Allowed values: >= 0

Default value: 0

See Also

ThornburyItemFactory, ThornburyModel, ClutterActor