AlpProgress Interface
[UI Widgets]


AlpProgress Object and Class Definitions

#define ALP_IS_PROGRESS(object)   (G_TYPE_CHECK_INSTANCE_TYPE ((object), ALP_TYPE_PROGRESS))
#define ALP_PROGRESS(object)   (G_TYPE_CHECK_INSTANCE_CAST ((object), ALP_TYPE_PROGRESS, AlpProgress))
#define ALP_TYPE_PROGRESS   (alp_progress_get_type ())
typedef _AlpProgress AlpProgress
GType alp_progress_get_type (void) G_GNUC_CONST
 get_type method for AlpProgress interface
#define ALP_PROGRESS_CANCEL_BUTTON   ((GtkWidget *)0x4)
#define ALP_PROGRESS_DEF_WIDGETS   ALP_PROGRESS_LABEL , ALP_PROGRESS_SECONDARY , ALP_PROGRESS_PBAR, ALP_PROGRESS_CANCEL_BUTTON
#define ALP_PROGRESS_LABEL   ((GtkWidget *)0x1)
 Widgets that are special to the progress API.
#define ALP_PROGRESS_PBAR   ((GtkWidget *)0x3)
#define ALP_PROGRESS_SECONDARY   ((GtkWidget *)0x2)

Interface API

Interface API calls for image and the well known progress widgets: label, secondary and pbar

void alp_progress_add_action_widget (AlpProgress *self, GtkWidget *child, gint response_id)
 Add widget to the button box of the action area.
GtkWidget * alp_progress_add_button (AlpProgress *self, const gchar *button_text, gint response_id)
 Add a button to the action area.
GtkWidget * alp_progress_add_widget (AlpProgress *self, GtkWidget *child)
 Add widget to widget area.
GtkWidget * alp_progress_get_image (AlpProgress *self)
 Return image widget being used in the AlpProgressDialog or AlpProgressWidget.
GtkWidget * alp_progress_get_label (AlpProgress *self)
 Return label widget being used for the AlpProgress's primary label.
void GtkWidget * alp_progress_get_pbar (AlpProgress *self)
 Return progress bar widget being used for the AlpProgress's progress bar.
void GtkWidget * alp_progress_get_secondary (AlpProgress *self)
 Return label widget being used for the AlpProgressDialog's secondary label.
void alp_progress_image_set_from_animation (AlpProgress *self, GdkPixbufAnimation *pixbuf_animation)
 Set image from a pixbuf animation.
void alp_progress_image_set_from_file (AlpProgress *self, const gchar *filename)
 Set the image from a file.
void alp_progress_image_set_from_pixbuf (AlpProgress *self, GdkPixbuf *pixbuf)
 Set the image from a pixbuf.
void alp_progress_image_set_from_stock (AlpProgress *self, const gchar *stock_id)
 Set image from a stock icon.
void alp_progress_label_format_markup (AlpProgress *self, const gchar *format,...) G_GNUC_PRINTF(2
 Format markup text for the primary label.
void alp_progress_label_format_text (AlpProgress *self, const gchar *format,...) G_GNUC_PRINTF(2
 Format text for the primary label.
void void alp_progress_label_set_markup (AlpProgress *self, const gchar *text)
 Set the markup text of the primary label.
void alp_progress_label_set_text (AlpProgress *self, const gchar *text)
 Set the text of the primary label.
void alp_progress_pbar_format_text (AlpProgress *self, const gchar *format,...) G_GNUC_PRINTF(2
 Format the text to appear superimposed on the progress bar.
void alp_progress_pbar_pulse (AlpProgress *self)
 Indicates that some progress is made, but you don't know how much.
void alp_progress_pbar_set_fraction (AlpProgress *self, gdouble fraction)
 Set the fraction of "completedness" of the progress bar.
void alp_progress_pbar_set_pulse_step (AlpProgress *self, gdouble fraction)
 Set the fraction to move the bouncing block.
void alp_progress_pbar_set_text (AlpProgress *self, const gchar *text)
 See the text to appear superimposed on the progress bar.
void alp_progress_pbar_start_pulse (AlpProgress *self, guint interval)
 Automatically pulse the progress bar at the specified rate.
void alp_progress_pbar_stop_pulse (AlpProgress *self)
 Stop automatic pulsing of the progress bar.
void alp_progress_response (AlpProgress *self, gint response_id)
 Generate "cancel" or "response" signal for the given widget and response id to simulate an user press on the widget.
void alp_progress_secondary_format_markup (AlpProgress *self, const gchar *format,...) G_GNUC_PRINTF(2
 Format markup text for the secondary label.
void alp_progress_secondary_format_text (AlpProgress *self, const gchar *format,...) G_GNUC_PRINTF(2
 Format text for the secondary label.
void void alp_progress_secondary_set_markup (AlpProgress *self, const gchar *text)
 Set the markup text of the secondary label.
void alp_progress_secondary_set_text (AlpProgress *self, const gchar *text)
 Set the text of the secondary label.


Define Documentation

#define ALP_IS_PROGRESS object   )     (G_TYPE_CHECK_INSTANCE_TYPE ((object), ALP_TYPE_PROGRESS))
 

#define ALP_PROGRESS object   )     (G_TYPE_CHECK_INSTANCE_CAST ((object), ALP_TYPE_PROGRESS, AlpProgress))
 

#define ALP_PROGRESS_CANCEL_BUTTON   ((GtkWidget *)0x4)
 

Add Cancel button to dialog

#define ALP_PROGRESS_DEF_WIDGETS   ALP_PROGRESS_LABEL , ALP_PROGRESS_SECONDARY , ALP_PROGRESS_PBAR, ALP_PROGRESS_CANCEL_BUTTON
 

#define ALP_PROGRESS_LABEL   ((GtkWidget *)0x1)
 

Widgets that are special to the progress API.

Use a label widget as the primary label widget

#define ALP_PROGRESS_PBAR   ((GtkWidget *)0x3)
 

Use a progress bar widget as the progress bar widget

#define ALP_PROGRESS_SECONDARY   ((GtkWidget *)0x2)
 

Use a label widget as the secondary label widget

#define ALP_TYPE_PROGRESS   (alp_progress_get_type ())
 


Typedef Documentation

typedef struct _AlpProgress AlpProgress
 


Function Documentation

void alp_progress_add_action_widget AlpProgress self,
GtkWidget *  child,
gint  response_id
 

Add widget to the button box of the action area.

Adds an activatable widget to the action area, connecting a signal handler that will emit the "response" signal on the box when the widget is activated. The widget is appended to the end of the dialog's action area. If you want to add a non-activatable widget, simply pack it into the widget's action_area.

Parameters:
[in] self an AlpProgress
[in] child an activatable widget
[in] response_id response ID for child

GtkWidget* alp_progress_add_button AlpProgress self,
const gchar *  button_text,
gint  response_id
 

Add a button to the action area.

Parameters:
[in] self an AlpProgress widget
[in] button text to be used to label button
[in] response_id integer response code to associate with added button

GtkWidget* alp_progress_add_widget AlpProgress self,
GtkWidget *  child
 

Add widget to widget area.

Parameters:
[in] self an AlpProgress widget
[in] child a GtkWidget to add to the widget area
Returns:
the added widget pointer

GtkWidget* alp_progress_get_image AlpProgress self  ) 
 

Return image widget being used in the AlpProgressDialog or AlpProgressWidget.

Parameters:
[in] self an AlpProgress
Returns:
the GtkWidget pointer of the image

GtkWidget* alp_progress_get_label AlpProgress self  ) 
 

Return label widget being used for the AlpProgress's primary label.

Parameters:
[in] self an AlpProgress widget
Returns:
the GtkWidget pointer of the label

void GtkWidget* alp_progress_get_pbar AlpProgress self  ) 
 

Return progress bar widget being used for the AlpProgress's progress bar.

Parameters:
[in] self an AlpProgress widget
Returns:
a GtkWidget progress bar

void GtkWidget* alp_progress_get_secondary AlpProgress self  ) 
 

Return label widget being used for the AlpProgressDialog's secondary label.

Parameters:
[in] self an AlpProgress widget
Returns:
a GtkWidget label

GType alp_progress_get_type void   ) 
 

get_type method for AlpProgress interface

Returns:
Returns the GType of AlpProgress interface

void alp_progress_image_set_from_animation AlpProgress self,
GdkPixbufAnimation *  pixbuf_animation
 

Set image from a pixbuf animation.

Set the image of dialog to the specified pixbuf animation. The AlpProgressDialog does not assume a reference to the pixbuf; you still need to unref it if you own references. AlpProgressDialog will add its own reference rather than adopting yours.

Note that this function just creates an GtkImage from the pixbuf animation. The GtkImage created will not react to state changes. Should you want that, you should use gtk_image_new_from_icon_set() on ALP_PROGRESS_DIALOG(dialog)->image.

Parameters:
[in] dialog an AlpProgress widget
[in] pixbuf_animation a GdkPixbufAnimation or NULL
See also:
GdkPixbufAnimation.

void alp_progress_image_set_from_file AlpProgress self,
const gchar *  filename
 

Set the image from a file.

Set the image of dialog to a new GtkImage displaying the image found in the file filename. If the file isn't found or can't be loaded, the resulting GtkImage will display a "broken image" icon.

If the file contains an animation, the image will contain an animation.

If you need to detect failures to load the file, use gdk_pixbuf_new_from_file() to load the file yourself, then create the GtkImage from the pixbuf. (Or for animations, use gdk_pixbuf_animation_new_from_file()).

Parameters:
[in] self an AlpProgress
[in] filename name of file containing image

void alp_progress_image_set_from_pixbuf AlpProgress self,
GdkPixbuf *  pixbuf
 

Set the image from a pixbuf.

Set the image of a progress dialog or widget to the specified pixbuf. The AlpProgressDialog or AlpProgressWidget does not assume a reference to the pixbuf; you still need to unref it if you own references. AlpProgressDialog will add its own reference rather than adopting yours.

Note that this function just creates an GtkImage from the pixbuf. The GtkImage created will not react to state changes. Should you want that, you should use gtk_image_new_from_icon_set() and assign ALP_PROGRESS_DIALOG(dialog)->image or ALP_PROGRESS_WIDGET(widget)->image to it.

Parameters:
[in] self an AlpProgress
[in] pixbuf a gdk::GdkPixbuf or NULL

void alp_progress_image_set_from_stock AlpProgress self,
const gchar *  stock_id
 

Set image from a stock icon.

Change the image of the progress to display the stock_icon. Sample stock icon names are ALP_STOCK_ALERT, GTK_STOCK_OPEN, or GTK_STOCK_EXIT. If the stock icon name isn't known, the image will be empty. You can register your own stock icon names, see gtk_icon_factory_add_default() and gtk_icon_factory_add().

Parameters:
[in] self an AlpProgress widget
[in] stock_id a stock icon name
See also:
Stock Items in the GTK+ Reference Manual, gtk_image_set_from_stock().

void alp_progress_label_format_markup AlpProgress self,
const gchar *  format,
  ...
 

Format markup text for the primary label.

Sets the text of the primary label to the results of processing the printf()-style format. This format could be marked up with the Pango text markup language.

Parameters:
[in] self an AlpProgress widget
[in] format printf()-style format string, or NULL
[in] ... arguments for format
Example
 alp_progress_label_format_markup (ALP_PROGRESS(dialog),
                                   "<b>File:</b> <i>%s</i>",
                                   filename);
See also:
GtkLabel, Pango Text Attribute Markup Language

void alp_progress_label_format_text AlpProgress self,
const gchar *  format,
  ...
 

Format text for the primary label.

Parameters:
[in] self an AlpProgress widget
[in] format printf()-style format string, or NULL
[in] ... arguments for formatting
Example
 alp_progress_label_format_text (ALP_PROGRESS(dialog),
                                 "State: %s",
                                 state_strings[current_state]);
See also:
GtkLabel

void void alp_progress_label_set_markup AlpProgress self,
const gchar *  text
 

Set the markup text of the primary label.

Parameters:
[in] self an AlpProgress
[in] text the text you want to set.
See also:
GtkLabel

void alp_progress_label_set_text AlpProgress self,
const gchar *  text
 

Set the text of the primary label.

Parameters:
[in] self an AlpProgress widget
[in] text the text you want to set.
See also:
GtkLabel

void alp_progress_pbar_format_text AlpProgress self,
const gchar *  format,
  ...
 

Format the text to appear superimposed on the progress bar.

Parameters:
[in] self an AlpProgress
[in] format printf()-style format string, or NULL
[in] ... arguments for format
Example
 alp_progress_pbar_format_text (ALP_PROGRESS(dialog), "%3d %%",
                                (bytes_read * 100) / bytes_total);

void alp_progress_pbar_pulse AlpProgress self  ) 
 

Indicates that some progress is made, but you don't know how much.

If progress bar is in "percentage mode", causes the progress bar to enter "activity mode", where a block bounces back and forth. Each call to alp_progress_pbar_pulse() causes the block to move by a little bit (the amount of movement per pulse is determined by alp_progress_pbar_set_pulse_step()).

Parameters:
[in] self an AlpProgress widget
See also:
GtkProgressBar

void alp_progress_pbar_set_fraction AlpProgress self,
gdouble  fraction
 

Set the fraction of "completedness" of the progress bar.

Causes the progress bar to "fill in" the given fraction of the bar. The fraction should be between 0.0 and 1.0, inclusive.

Parameters:
[in] self an AlpProgress widget
[in] fraction fraction of the task that's been completed
See also:
GtkProgressBar

void alp_progress_pbar_set_pulse_step AlpProgress self,
gdouble  fraction
 

Set the fraction to move the bouncing block.

Sets the fraction of total progress bar length to move the bouncing block for each call to alp_progress_pbar_pulse().

Parameters:
[in] self an AlpProgress widget
[in] fraction fraction between 0.0 and 1.0
See also:
GtkProgressBar

void alp_progress_pbar_set_text AlpProgress self,
const gchar *  text
 

See the text to appear superimposed on the progress bar.

Parameters:
[in] self an AlpProgress
[in] text a UTF-8 string
See also:
GtkProgressBar

void alp_progress_pbar_start_pulse AlpProgress self,
guint  interval
 

Automatically pulse the progress bar at the specified rate.

Parameters:
[in] self an AlpProgress widget
[in] interval the interval between pulses in milliseconds
See also:
GtkProgressBar

void alp_progress_pbar_stop_pulse AlpProgress self  ) 
 

Stop automatic pulsing of the progress bar.

Parameters:
[in] self an AlpProgress widget
See also:
GtkProgressBar

void alp_progress_response AlpProgress self,
gint  response_id
 

Generate "cancel" or "response" signal for the given widget and response id to simulate an user press on the widget.

Parameters:
[in] self Widget implementing AlpProgress interface
[in] response_id The response code used to emit the proper signal

void alp_progress_secondary_format_markup AlpProgress self,
const gchar *  format,
  ...
 

Format markup text for the secondary label.

Sets the text of the secondary label to the results of processing the printf()-style format. This format could be marked up with the Pango text markup language.

Parameters:
[in] self an AlpProgress widget
[in] format printf()-style format string, or NULL
[in] ... arguments for format
Example
 alp_progress_secondary_format_markup (ALP_PROGRESS(dialog),
                                       "<b>File:</b> <i>%s</i>",
                                       filename);
See also:
GtkLabel, Pango Text Attribute Markup Language

void alp_progress_secondary_format_text AlpProgress self,
const gchar *  format,
  ...
 

Format text for the secondary label.

Sets the text of the secondary label to the string resulting from processing the printf()-style format.

Parameters:
[in] self an AlpProgress widget
[in] format printf()-style format string, or NULL
[in] ... arguments for format
Example
 alp_progress_secondary_format_text (ALP_PROGRESS(progress_widget),
                                     "File: %s",
                                     filename);
See also:
GtkLabel.

void void alp_progress_secondary_set_markup AlpProgress self,
const gchar *  text
 

Set the markup text of the secondary label.

Parameters:
[in] self an AlpProgress widget
[in] text a UTF-8 string.
See also:
GtkLabel.

void alp_progress_secondary_set_text AlpProgress self,
const gchar *  text
 

Set the text of the secondary label.

Parameters:
[in] self an AlpProgress widget
[in] text a UTF-8 string.
See also:
GtkLabel.


Generated on Wed Jul 30 07:06:43 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.