RBSourceHeader

RBSourceHeader — container for search box and toolbar

Synopsis

                    RBSourceHeader;
                    RBSourceHeaderClass;
RBSourceHeader *    rb_source_header_new                (GtkUIManager *mgr,
                                                         GtkActionGroup *actiongroup);
void                rb_source_header_set_source         (RBSourceHeader *header,
                                                         RBSource *source);
void                rb_source_header_clear_search       (RBSourceHeader *header);
void                rb_source_header_sync_control_state (RBSourceHeader *header);
void                rb_source_header_focus_search_box   (RBSourceHeader *header);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkTable
                                 +----RBSourceHeader

Implemented Interfaces

RBSourceHeader implements AtkImplementorIface and GtkBuildable.

Properties

  "action-group"             GtkActionGroup*       : Read / Write / Construct Only
  "source"                   RBSource*             : Read / Write
  "ui-manager"               GtkUIManager*         : Read / Write / Construct Only

Signals

  "get-search-actions"                             : Run Last
  "refresh-search-bar"                             : Run Last

Description

The source header contains the search box and the search action toolbar. It remembers the search text and browser visibility state for each source, applying the stored state for the newly selected source when the source selection changes.

The search bar contains a set of actions determined by the selected source. The source is responsible for tracking which search action is active.

Details

RBSourceHeader

typedef struct _RBSourceHeader RBSourceHeader;


RBSourceHeaderClass

typedef struct {
	GtkTableClass parent_class;

	/* action signal */
	void (*refresh_search_bar) (RBSourceHeader *header);
} RBSourceHeaderClass;


rb_source_header_new ()

RBSourceHeader *    rb_source_header_new                (GtkUIManager *mgr,
                                                         GtkActionGroup *actiongroup);

Creates the RBSourceHeader.

mgr :

the GtkUIManager

actiongroup :

the GtkActionGroup to add actions to

Returns :

the RBSourceHeader instance

rb_source_header_set_source ()

void                rb_source_header_set_source         (RBSourceHeader *header,
                                                         RBSource *source);

Updates the source header when a new source is selected.

header :

the RBSourceHeader

source :

the new selected RBSource

rb_source_header_clear_search ()

void                rb_source_header_clear_search       (RBSourceHeader *header);

Clears the search box and resets all search state for the current selected source.

header :

the RBSourceHeader

rb_source_header_sync_control_state ()

void                rb_source_header_sync_control_state (RBSourceHeader *header);

Updates the sensitivity and active state of various actions related to the source header.

header :

the RBSourceHeader

rb_source_header_focus_search_box ()

void                rb_source_header_focus_search_box   (RBSourceHeader *header);

Grabs input focus for the search box.

header :

the RBSourceHeader

Property Details

The "action-group" property

  "action-group"             GtkActionGroup*       : Read / Write / Construct Only

The GtkActionGroup to add actions to.


The "source" property

  "source"                   RBSource*             : Read / Write

The currently selected RBSource.


The "ui-manager" property

  "ui-manager"               GtkUIManager*         : Read / Write / Construct Only

The GtkUIManager instance.

Signal Details

The "get-search-actions" signal

GValueArray*        user_function                      (RBSourceHeader *header,
                                                        RBSource       *arg1,
                                                        gpointer        user_data)      : Run Last

Allows signal handlers to add search actions to the search bar by returning an array of search action names.

header :

the RBSourceHeader

user_data :

user data set when the signal handler was connected.

The "refresh-search-bar" signal

void                user_function                      (RBSourceHeader *header,
                                                        gpointer        user_data)      : Run Last

An action signal used to repopulate the search bar. This should be called after a signal handler for "get-search-actions" has been connected or disconnected.

header :

the RBSourceHeader

user_data :

user data set when the signal handler was connected.