![]() |
![]() |
![]() |
Netbook Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
NbtkWidget; void nbtk_widget_set_style_pseudo_class (NbtkWidget *actor
,const gchar *pseudo_class
); const gchar * nbtk_widget_get_style_pseudo_class (NbtkWidget *actor
); void nbtk_widget_set_style_class_name (NbtkWidget *actor
,const gchar *style_class
); const gchar * nbtk_widget_get_style_class_name (NbtkWidget *actor
); void nbtk_widget_set_has_tooltip (NbtkWidget *widget
,gboolean has_tooltip
); gboolean nbtk_widget_get_has_tooltip (NbtkWidget *widget
); void nbtk_widget_set_tooltip_text (NbtkWidget *widget
,const gchar *text
); const gchar* nbtk_widget_get_tooltip_text (NbtkWidget *widget
); void nbtk_widget_show_tooltip (NbtkWidget *widget
); void nbtk_widget_hide_tooltip (NbtkWidget *widget
); void nbtk_widget_ensure_style (NbtkWidget *widget
); ClutterActor * nbtk_widget_get_background_image (NbtkWidget *actor
); ClutterActor * nbtk_widget_get_border_image (NbtkWidget *actor
); void nbtk_widget_get_padding (NbtkWidget *widget
,NbtkPadding *padding
); void nbtk_widget_draw_background (NbtkWidget *widget
);
GObject +----GInitiallyUnowned +----ClutterActor +----NbtkWidget +----NbtkBin +----NbtkBoxLayout +----NbtkComboBox +----NbtkEntry +----NbtkGrid +----NbtkIcon +----NbtkLabel +----NbtkPopup +----NbtkProgressBar +----NbtkTable +----NbtkTooltip
NbtkWidget implements ClutterScriptable, ClutterAnimatable, AtkImplementorIface and NbtkStylable.
"has-tooltip" gboolean : Read / Write "pseudo-class" gchar* : Read / Write "stylable" gboolean : Read / Write "style-class" gchar* : Read / Write "tooltip-text" gchar* : Read / Write
NbtkWidget is a simple abstract class on top of ClutterActor. It provides basic themeing properties.
Actors in the Nbtk library should subclass NbtkWidget if they plan to obey to a certain NbtkStyle.
typedef struct _NbtkWidget NbtkWidget;
Base class for stylable actors. The contents of the NbtkWidget structure are private and should only be accessed through the public API.
void nbtk_widget_set_style_pseudo_class (NbtkWidget *actor
,const gchar *pseudo_class
);
Set the style pseudo class
|
a NbtkWidget |
|
a new pseudo class string |
const gchar * nbtk_widget_get_style_pseudo_class (NbtkWidget *actor
);
Get the current style pseudo class
|
a NbtkWidget |
Returns : |
the pseudo class string. The string is owned by the NbtkWidget and should not be modified or freed. |
void nbtk_widget_set_style_class_name (NbtkWidget *actor
,const gchar *style_class
);
Set the style class name
|
a NbtkWidget |
|
a new style class string |
const gchar * nbtk_widget_get_style_class_name (NbtkWidget *actor
);
Get the current style class name
|
a NbtkWidget |
Returns : |
the class name string. The string is owned by the NbtkWidget and should not be modified or freed. |
void nbtk_widget_set_has_tooltip (NbtkWidget *widget
,gboolean has_tooltip
);
Enables tooltip support on the NbtkWidget.
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 NbtkWidget |
|
TRUE if the widget should display a tooltip |
gboolean nbtk_widget_get_has_tooltip (NbtkWidget *widget
);
Returns the current value of the has-tooltip property. See
nbtk_tooltip_set_has_tooltip()
for more information.
|
A NbtkWidget |
Returns : |
current value of has-tooltip on widget
|
void nbtk_widget_set_tooltip_text (NbtkWidget *widget
,const gchar *text
);
Set the tooltip text of the widget. This will set NbtkWidget::has-tooltip to TRUE. A value of NULL will unset the tooltip and set has-tooltip to FALSE.
|
A NbtkWidget |
|
text to set as the tooltip |
const gchar* nbtk_widget_get_tooltip_text (NbtkWidget *widget
);
Get the current tooltip string
|
A NbtkWidget |
Returns : |
The current tooltip string, owned by the NbtkWidget |
void nbtk_widget_show_tooltip (NbtkWidget *widget
);
Show the tooltip for widget
|
A NbtkWidget |
void nbtk_widget_hide_tooltip (NbtkWidget *widget
);
Hide the tooltip for widget
|
A NbtkWidget |
void nbtk_widget_ensure_style (NbtkWidget *widget
);
Ensures that widget
has read its style information.
|
A NbtkWidget |
ClutterActor * nbtk_widget_get_background_image (NbtkWidget *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 NbtkWidget |
Returns : |
a ClutterActor |
ClutterActor * nbtk_widget_get_border_image (NbtkWidget *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 NbtkWidget |
Returns : |
ClutterActor |
void nbtk_widget_get_padding (NbtkWidget *widget
,NbtkPadding *padding
);
Gets the padding of the widget, set using the "padding" CSS property. This function should normally only be used by subclasses.
|
A NbtkWidget |
|
A pointer to an NbtkPadding to fill |
void nbtk_widget_draw_background (NbtkWidget *widget
);
Invokes NbtkWidget::draw_background()
using the default background
image and/or color from the widget
style
This function should be used by subclasses of NbtkWidget that override
the paint()
virtual function and cannot chain up
|
a NbtkWidget |
"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
"pseudo-class"
property"pseudo-class" gchar* : Read / Write
The pseudo-class of the actor. Typical values include "hover", "active", "focus".
Default value: ""
"stylable"
property"stylable" gboolean : Read / Write
Enable or disable styling of the widget
Default value: TRUE
"style-class"
property"style-class" gchar* : Read / Write
The style-class of the actor for use in styling.
Default value: ""
"tooltip-text"
property"tooltip-text" gchar* : Read / Write
text displayed on the tooltip
Default value: ""