![]() | ![]() | ![]() | Cuiterm Reference Manual | ![]() |
---|
#include <history.h> CuiRectangle; CuiWidget* cui_rectangle_new (void); void cui_rectangle_set_color (CuiRectangle *rec, const char *color_name, const char *high_color_name, const char *low_color_name); GdkColor* cui_rectangle_get_color (CuiRectangle *rec); GdkColor* cui_rectangle_get_high_color (CuiRectangle *rec); GdkColor* cui_rectangle_get_low_color (CuiRectangle *rec); void cui_rectangle_set_is_dnd_source (CuiRectangle *rectangle, gboolean is_dnd_source); gboolean cui_rectangle_is_dnd_source (CuiRectangle *rectangle); void cui_rectangle_set_dnd_source_data (CuiRectangle *rectangle, TargetType source_type, gpointer source_data, gsize source_size); void cui_rectangle_set_is_dnd_target (CuiRectangle *rectangle, gboolean is_dnd_target); gboolean cui_rectangle_is_dnd_target (CuiRectangle *rectangle); void cui_rectangle_set_target_list (CuiRectangle *rec, GtkTargetList *list); GtkTargetList* cui_rectangle_get_target_list (CuiRectangle *rec); void cui_rectangle_set_target_object (CuiRectangle *rec, GObject *object); gboolean cui_rectangle_set_highlighted (CuiRectangle *rectangle, gboolean highlighted); gboolean cui_rectangle_redraw (CuiRectangle *rectangle, gint debug); guint cui_rectangle_get_expose_signal_id (void);
GObject +----CuiWidget +----CuiRectangle +----CuiRectangleEmboss +----CuiSizeBar +----CuiFrame +----CuiWindow
"color" gpointer : Read / Write "high-color" gpointer : Read / Write "is-dnd-source" gboolean : Read / Write "is-dnd-target" gboolean : Read / Write "is-highlighted" gboolean : Read / Write "low-color" gpointer : Read / Write "target-list" gpointer : Read / Write "target-object" gpointer : Read / Write
"drop-data-received" void user_function (CuiRectangle *cuirectangle, gpointer arg1, gpointer user_data); "expose" gboolean user_function (CuiRectangle *cuirectangle, gint arg1, gpointer user_data);
typedef struct { gboolean is_dnd_target; gboolean is_dnd_source; gboolean is_highlighted; TargetType source_type; gpointer source_data; gsize source_size; GtkTargetList *target_list; gpointer target_object; } CuiRectangle;
The base class for rectangular passive widgets such as frames, embossed color rectangles.
gboolean is_dnd_target ; | TRUE if the rectangle can be a Drag&Drop target |
gboolean is_dnd_source ; | TRUE if the rectangle can be a Drag&Drop source |
gboolean is_highlighted ; | TRUE if the rectangle is highlighted (drag-motion) |
TargetType source_type ; | the type of the data we drag from here |
gpointer source_data ; | the data we drag from here |
gsize source_size ; | the size of the data we drag from here |
GtkTargetList *target_list ; | the GtktargetList of acceptable DnD types |
gpointer target_object ; | the G_OBJECT which act as a the target for the DnD |
CuiWidget* cui_rectangle_new (void);
Creates a new rectangle.
Returns : | a new CuiRectangle as CuiWidget |
void cui_rectangle_set_color (CuiRectangle *rec, const char *color_name, const char *high_color_name, const char *low_color_name);
Sets the three colors for the frame. The function also allocates these colors for the Background of the widget.
rec : | a CuiRectangle widget |
color_name : | the color for the widget |
high_color_name : | the high color |
low_color_name : | the low color |
GdkColor* cui_rectangle_get_color (CuiRectangle *rec);
Returns the color of the rectangle.
rec : | |
Returns : | the color of the rectangle as a GdkColor |
GdkColor* cui_rectangle_get_high_color (CuiRectangle *rec);
Returns the color of the rectangle.
rec : | |
Returns : | the color of the rectangle as a GdkColor |
GdkColor* cui_rectangle_get_low_color (CuiRectangle *rec);
Returns the color of the rectangle.
rec : | |
Returns : | the color of the rectangle as a GdkColor |
void cui_rectangle_set_is_dnd_source (CuiRectangle *rectangle, gboolean is_dnd_source);
Sets the "is_dnd_source" property which is TRUE if this rectangle can be a Drag&Drop source.
rectangle : | |
is_dnd_source : | the new value of the is_dnd_source property |
gboolean cui_rectangle_is_dnd_source (CuiRectangle *rectangle);
Returns TRUE if the rectangle can be a Drag&Drop source.
rectangle : | |
Returns : | TRUE if the rectangle can be a Drag&Drop source |
void cui_rectangle_set_dnd_source_data (CuiRectangle *rectangle, TargetType source_type, gpointer source_data, gsize source_size);
Sets the information needed to start a Drag&Drop operation. Every DnD source is capable of initializing a one type DnD operation.
rectangle : | |
source_type : | a TargetType type source type identifier |
source_data : | the dragged data pointer |
source_size : | the size of the source_data |
void cui_rectangle_set_is_dnd_target (CuiRectangle *rectangle, gboolean is_dnd_target);
Sets the "is_dnd_target" property which is TRUE if this rectangle can be a Drag&Drop target.
rectangle : | |
is_dnd_target : | the new value of the is_dnd_target property |
gboolean cui_rectangle_is_dnd_target (CuiRectangle *rectangle);
Returns TRUE if the rectangle can be a Drag&Drop target.
rectangle : | |
Returns : | TRUE if the rectangle can be a Drag&Drop target |
void cui_rectangle_set_target_list (CuiRectangle *rec, GtkTargetList *list);
Sets the target list of the rectangle. This list is storing the data types this rectangle can handle as DnD target.
rec : | |
list : | a new GtkTargetList for this rectangle |
GtkTargetList* cui_rectangle_get_target_list (CuiRectangle *rec);
Returns the GtkTargetList of the rectangle. This list contains the DnD types this rectangle can handle as a target.
rec : | |
Returns : | the target list of the rectangle |
void cui_rectangle_set_target_object (CuiRectangle *rec, GObject *object);
Sets the Drag&Drop target object for the rectangle. The rectangle will hold a reference of the object until we change the target.
rec : | |
object : | the new target object |
gboolean cui_rectangle_set_highlighted (CuiRectangle *rectangle, gboolean highlighted);
Sets the highlight status of the rectangle. The rectangle is highlighted when the mouse is moving over it during a Drag&Drop operation. The function redrawi the rectangle if necessary.
rectangle : | |
highlighted : | if the rectangle widget is highlighted |
Returns : | the original highlight status of the rectangle |
gboolean cui_rectangle_redraw (CuiRectangle *rectangle, gint debug);
Emits the expose event for the widget to redraw the screen.
rectangle : | the CuiRectangle to redraw |
debug : | if this argument is not 0 the area will be highlighted |
Returns : | the return value of the signal handler |
guint cui_rectangle_get_expose_signal_id (void);
Returns the id of the "expose" signal. This function is for internal use only.
Returns : | the numerical id of the "expose" signal |
"high-color" gpointer : Read / Write
The color of the upper left part of the rectangle.
"is-dnd-source" gboolean : Read / Write
If the rectangle can be a Drag&Drop source.
Default value: FALSE
"is-dnd-target" gboolean : Read / Write
If the rectangle can be a Drag&Drop target.
Default value: FALSE
"is-highlighted" gboolean : Read / Write
If the rectangle is highlighted (DnD motion).
Default value: FALSE
"low-color" gpointer : Read / Write
The color of the upper right part of the rectangle.
"target-list" gpointer : Read / Write
The GtkTargetList shows what can this rectangle accept as a DnD target.
void user_function (CuiRectangle *cuirectangle, gpointer arg1, gpointer user_data);
arg1 : | @: @: @: @: @: |
cuirectangle : | the object which received the signal. @: @: @: @: |
user_data : | user data set when the signal handler was connected. |
gboolean user_function (CuiRectangle *cuirectangle, gint arg1, gpointer user_data);
user_data : | user data set when the signal handler was connected. |
Returns : |
<<< CuiWidget | CuiRectangleEmboss >>> |