MokoSearchBar

MokoSearchBar — An implementation of the OpenMoko "Search Bar" user interface

Synopsis




                    MokoSearchBar;
GtkWidget*          moko_search_bar_new                 ();
GtkWidget*          moko_search_bar_new_with_combo      (GtkComboBox *combo);
GtkComboBox*        moko_search_bar_get_combo_box       (MokoSearchBar *self);
GtkEntry*           moko_search_bar_get_entry           (MokoSearchBar *self);
gboolean            moko_search_bar_search_visible      (MokoSearchBar *self);
void                moko_search_bar_toggle              (MokoSearchBar *self);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkHBox
                                       +----MokoSearchBar

Implemented Interfaces

MokoSearchBar implements AtkImplementorIface.

Properties


  "combo"                    GtkComboBox           : Read / Write / Construct Only
  "entry"                    GtkEntry              : Read

Signals


  "combo-changed"                                  : Run Last
  "text-changed"                                   : Run Last
  "toggled"                                        : Run Last

Description

The MokoSearchBar is a composite widget that implements the "Search Bar" user interface from OpenMoko. It comprises of a GtkEntry, a GtkComboBox and a GtkToggleButton that toggles the visibility of the entry and combo box.

Details

MokoSearchBar

typedef struct _MokoSearchBar MokoSearchBar;

MokoSearchBar has no publicly accessible fields


moko_search_bar_new ()

GtkWidget*          moko_search_bar_new                 ();

Create a new MokoSearBar widget

Returns : The newly created MokoSearchBar

moko_search_bar_new_with_combo ()

GtkWidget*          moko_search_bar_new_with_combo      (GtkComboBox *combo);

Creates a MokoSearchBar with the specified combo box

combo : a GtkComboBox to use as the combobox
Returns : the newly created MokoSearchBar

moko_search_bar_get_combo_box ()

GtkComboBox*        moko_search_bar_get_combo_box       (MokoSearchBar *self);

Get a pointer to the GtkComboBox being used in the MokoSearchBar

self : a MokoSearchBar
Returns : the GtkComboBox

moko_search_bar_get_entry ()

GtkEntry*           moko_search_bar_get_entry           (MokoSearchBar *self);

Retrieve the GtkEntry widget being used in the MokoSearchBar

self : a MokoSearchBar
Returns : the GtkEntry

moko_search_bar_search_visible ()

gboolean            moko_search_bar_search_visible      (MokoSearchBar *self);

Determine the visibility of the search entry.

self : a MokoSaerchBar
Returns : TRUE if the search entry is visible

moko_search_bar_toggle ()

void                moko_search_bar_toggle              (MokoSearchBar *self);

Toggle the search button on the MokoSearchBar. This toggles the visibility of the combo box and entry widgets.

self : a MokoSearchBar

Property Details

The "combo" property

  "combo"                    GtkComboBox           : Read / Write / Construct Only

The GtkComboBox to place inside the widget.


The "entry" property

  "entry"                    GtkEntry              : Read

The GtkEntry created for this widget.

Signal Details

The "combo-changed" signal

void                user_function                      (MokoSearchBar *searchbar,
                                                        GtkComboBox   *combo,
                                                        gpointer       user_data)      : Run Last

The ::combo-changed signal is emitted each time the underlying GtkComboBox receives its ::changed signal.

searchbar : The MokoSearchBar that received the signal
combo : The underlying GtkComboBox that received the ::changed signal.
user_data : User data set when the signal handler was connected.
user_data : user data set when the signal handler was connected.

The "text-changed" signal

void                user_function                      (MokoSearchBar *searchbar,
                                                        gpointer       editable,
                                                        gpointer       user_data)      : Run Last

The ::text-changed signal is emitted each time the underlying GtkEditable receives its ::changed signal.

searchbar : The MokoSearchBar that received the signal
editable : The underlying GtkEditable that received the ::changed signal.
user_data : User data set when the signal handler was connected.
user_data : user data set when the signal handler was connected.

The "toggled" signal

void                user_function                      (MokoSearchBar *searchbar,
                                                        gboolean       search_visible,
                                                        gpointer       user_data)           : Run Last

The ::toggled signal is emitted each time the search button is pressed.

searchbar : The MokoSearchBar that received the signal
search_visible : TRUE if the search entry is visible, FALSE otherwise
user_data : User data set when the signal handler was connected.
user_data : user data set when the signal handler was connected.

See Also

GtkEntry, GtkComboBox