![]() |
![]() |
![]() |
Moblin UI Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
MxWidget; void mx_widget_get_available_area (MxWidget *widget, const ClutterActorBox *allocation, ClutterActorBox *area); void mx_widget_set_has_tooltip (MxWidget *widget, gboolean has_tooltip); gboolean mx_widget_get_has_tooltip (MxWidget *widget); void mx_widget_set_tooltip_text (MxWidget *widget, const gchar *text); const gchar* mx_widget_get_tooltip_text (MxWidget *widget); void mx_widget_show_tooltip (MxWidget *widget); void mx_widget_hide_tooltip (MxWidget *widget); void mx_widget_ensure_style (MxWidget *widget); ClutterActor * mx_widget_get_background_image (MxWidget *actor); ClutterActor * mx_widget_get_border_image (MxWidget *actor); void mx_widget_get_padding (MxWidget *widget, MxPadding *padding); void mx_widget_paint_background (MxWidget *widget);
GObject +----GInitiallyUnowned +----ClutterActor +----MxWidget +----MxBin +----MxBoxLayout +----MxComboBox +----MxEntry +----MxGrid +----MxIcon +----MxLabel +----MxNotebook +----MxFloatingWidget +----MxProgressBar +----MxSlider +----MxTable +----MxToggle
MxWidget is a simple abstract class on top of ClutterActor. It provides basic themeing properties.
Actors in the Mx library should subclass MxWidget if they plan to obey to a certain MxStyle.
typedef struct _MxWidget MxWidget;
Base class for stylable actors. The contents of the MxWidget structure are private and should only be accessed through the public API.
void mx_widget_get_available_area (MxWidget *widget, const ClutterActorBox *allocation, ClutterActorBox *area);
|
|
|
|
|
void mx_widget_set_has_tooltip (MxWidget *widget, gboolean has_tooltip);
Enables tooltip support on the MxWidget.
Note that setting has-tooltip to TRUE will cause the widget to be set reactive. If you no longer need tooltip support and do not need the widget to be reactive, you need to set ClutterActor::reactive to FALSE.
|
A MxWidget |
|
TRUE if the widget should display a tooltip |
gboolean mx_widget_get_has_tooltip (MxWidget *widget);
Returns the current value of the has-tooltip property. See
mx_tooltip_set_has_tooltip()
for more information.
|
A MxWidget |
Returns : |
current value of has-tooltip on widget
|
void mx_widget_set_tooltip_text (MxWidget *widget, const gchar *text);
Set the tooltip text of the widget. This will set MxWidget::has-tooltip to TRUE. A value of NULL will unset the tooltip and set has-tooltip to FALSE.
|
A MxWidget |
|
text to set as the tooltip |
const gchar* mx_widget_get_tooltip_text (MxWidget *widget);
Get the current tooltip string
void mx_widget_show_tooltip (MxWidget *widget);
Show the tooltip for widget
|
A MxWidget |
void mx_widget_hide_tooltip (MxWidget *widget);
Hide the tooltip for widget
|
A MxWidget |
void mx_widget_ensure_style (MxWidget *widget);
Ensures that widget
has read its style information.
|
A MxWidget |
ClutterActor * mx_widget_get_background_image (MxWidget *actor);
Get the texture used as the background image. This is set using the "background-image" CSS property. This function should normally only be used by subclasses.
|
A MxWidget |
Returns : |
a ClutterActor |
ClutterActor * mx_widget_get_border_image (MxWidget *actor);
Get the texture used as the border image. This is set using the "border-image" CSS property. This function should normally only be used by subclasses.
|
A MxWidget |
Returns : |
ClutterActor |
void mx_widget_get_padding (MxWidget *widget, MxPadding *padding);
Gets the padding of the widget, set using the "padding" CSS property. This function should normally only be used by subclasses.
void mx_widget_paint_background (MxWidget *widget);
Invokes ""paint_background()
using the default background
image and/or color from the widget
style
This function should be used by subclasses of MxWidget that override
the paint()
virtual function and cannot chain up
|
a MxWidget |
"has-tooltip"
property"has-tooltip" gboolean : Read / Write
Determines whether the widget has a tooltip. If set to TRUE, causes the widget to monitor enter and leave events (i.e. sets the widget reactive).
Default value: FALSE
"long-press"
signalgboolean user_function (MxWidget *widget, gfloat arg1, gfloat arg2, MxLongPressAction arg3, gpointer user_data) : Run Last
Emitted when the user holds a mouse button down for a longer period.
|
the object that received the signal |
|
user data set when the signal handler was connected. |