OssoABookAlphaBar

OssoABookAlphaBar — A toolbar containing alphabetical shortcuts.

Synopsis




            OssoABookAlphaBar;
OssoABookAlphaBar* osso_abook_alpha_bar_new (OssoABookTreeView *view);
OssoABookTreeView* osso_abook_alpha_bar_get_view
                                            (OssoABookAlphaBar *bar);
GtkActionGroup* osso_abook_alpha_bar_get_action_group
                                            (OssoABookAlphaBar *bar);
void        osso_abook_alpha_bar_merge      (OssoABookAlphaBar *bar,
                                             GtkUIManager *ui_manager,
                                             guint merge_id,
                                             const char *path,
                                             gboolean add_separators);
GtkWidget*  osso_abook_alpha_bar_create_button_row
                                            (OssoABookAlphaBar *bar);


Object Hierarchy


  GObject
   +----OssoABookAlphaBar

Properties


  "action-group"         GtkActionGroup        : Read
  "view"                 OssoABookTreeView     : Read / Write / Construct Only

Signal Prototypes


"insensitive-press"
            gboolean    user_function      (OssoABookAlphaBar *alpha_bar,
                                            gpointer user_data);

Description

The OssoABookAlphaBar is a bar of locale-specific shortcuts to ranges of alphanumeric characters. When a shortcut is activated, the cursor of the associated OssoABookTreeView will be moved to the first row starting with one of the characters from the range.

There are two ways to use an OssoABookAlphaBar. The first one is to merge it into a GtkUIManager using osso_abook_alpha_bar_merge(). The second one is to create an independent array of buttons using osso_abook_alpha_bar_create_button_row().

Details

OssoABookAlphaBar

typedef struct _OssoABookAlphaBar OssoABookAlphaBar;

There are no public fields in OssoABookAlphaBar.


osso_abook_alpha_bar_new ()

OssoABookAlphaBar* osso_abook_alpha_bar_new (OssoABookTreeView *view);

Creates a new OssoABookAlphaBar object.

view : an OssoABookTreeView
Returns : A new OssoABookAlphaBar object.

osso_abook_alpha_bar_get_view ()

OssoABookTreeView* osso_abook_alpha_bar_get_view
                                            (OssoABookAlphaBar *bar);

Retreives the associated OssoABookTreeView.

bar : An OssoABookAlphaBar
Returns : The associated OssoABookTreeView.

osso_abook_alpha_bar_get_action_group ()

GtkActionGroup* osso_abook_alpha_bar_get_action_group
                                            (OssoABookAlphaBar *bar);

Retreives the contained GtkActionGroup.

bar : An OssoABookAlphaBar
Returns : The contained GtkActionGroup.

osso_abook_alpha_bar_merge ()

void        osso_abook_alpha_bar_merge      (OssoABookAlphaBar *bar,
                                             GtkUIManager *ui_manager,
                                             guint merge_id,
                                             const char *path,
                                             gboolean add_separators);

Inserts the shortcuts into ui_manager at path.

bar : An OssoABookAlphaBar
ui_manager : A GtkUIManager
merge_id : A merge ID. See gtk_ui_manager_new_merge_id()
path : a path
add_separators : TRUE if separators are wanted in between of the elements

osso_abook_alpha_bar_create_button_row ()

GtkWidget*  osso_abook_alpha_bar_create_button_row
                                            (OssoABookAlphaBar *bar);

Creates a row of regular GtkButtons for the shortcuts of bar. The returned widget holds a reference on bar.

bar : An OssoABookAlphaBar
Returns : A newly created GtkHBox containing GtkButtons for the shortcuts of bar.

Properties

The "action-group" property

  "action-group"         GtkActionGroup        : Read

The contained GtkActionGroup.


The "view" property

  "view"                 OssoABookTreeView     : Read / Write / Construct Only

The associated OssoABookTreeView.

Signals

The "insensitive-press" signal

gboolean    user_function                  (OssoABookAlphaBar *alpha_bar,
                                            gpointer user_data);

Callback to occur whenever OK is insensitive and was clicked.

alpha_bar : The OssoABookAlphaBar that emitted the callback
user_data : user data set when the signal handler was connected.
Returns : TRUE if the callback handled it, FALSE otherwise.

See Also

OssoABookTreeView