Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ev-toolbar.h File Reference
#include <gtk/gtk.h>
#include "ev-window.h"
+ Include dependency graph for ev-toolbar.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _EvToolbar
 
struct  _EvToolbarClass
 

Macros

#define EV_TYPE_TOOLBAR   (ev_toolbar_get_type())
 
#define EV_TOOLBAR(object)   (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_TOOLBAR, EvToolbar))
 
#define EV_IS_TOOLBAR(object)   (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_TOOLBAR))
 
#define EV_TOOLBAR_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_TOOLBAR, EvToolbarClass))
 
#define EV_IS_TOOLBAR_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_TOOLBAR))
 
#define EV_TOOLBAR_GET_CLASS(object)   (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_TOOLBAR, EvToolbarClass))
 

Typedefs

typedef struct _EvToolbar EvToolbar
 
typedef struct _EvToolbarClass EvToolbarClass
 
typedef struct _EvToolbarPrivate EvToolbarPrivate
 

Enumerations

enum  EvToolbarMode { EV_TOOLBAR_MODE_NORMAL, EV_TOOLBAR_MODE_FULLSCREEN, EV_TOOLBAR_MODE_RECENT_VIEW }
 

Functions

GType ev_toolbar_get_type (void)
 
GtkWidget * ev_toolbar_new (EvWindow *window)
 
gboolean ev_toolbar_has_visible_popups (EvToolbar *ev_toolbar)
 
void ev_toolbar_action_menu_popup (EvToolbar *ev_toolbar)
 
GtkWidget * ev_toolbar_get_page_selector (EvToolbar *ev_toolbar)
 
void ev_toolbar_set_mode (EvToolbar *ev_toolbar, EvToolbarMode mode)
 
EvToolbarMode ev_toolbar_get_mode (EvToolbar *ev_toolbar)
 

Macro Definition Documentation

#define EV_IS_TOOLBAR (   object)    (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_TOOLBAR))

Definition at line 37 of file ev-toolbar.h.

#define EV_IS_TOOLBAR_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_TOOLBAR))

Definition at line 39 of file ev-toolbar.h.

#define EV_TOOLBAR (   object)    (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_TOOLBAR, EvToolbar))

Definition at line 36 of file ev-toolbar.h.

#define EV_TOOLBAR_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_TOOLBAR, EvToolbarClass))

Definition at line 38 of file ev-toolbar.h.

#define EV_TOOLBAR_GET_CLASS (   object)    (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_TOOLBAR, EvToolbarClass))

Definition at line 40 of file ev-toolbar.h.

#define EV_TYPE_TOOLBAR   (ev_toolbar_get_type())

Definition at line 35 of file ev-toolbar.h.

Typedef Documentation

typedef struct _EvToolbar EvToolbar

Definition at line 42 of file ev-toolbar.h.

Definition at line 43 of file ev-toolbar.h.

Definition at line 44 of file ev-toolbar.h.

Enumeration Type Documentation

Enumerator
EV_TOOLBAR_MODE_NORMAL 
EV_TOOLBAR_MODE_FULLSCREEN 
EV_TOOLBAR_MODE_RECENT_VIEW 

Definition at line 29 of file ev-toolbar.h.

Function Documentation

void ev_toolbar_action_menu_popup ( EvToolbar ev_toolbar)

Definition at line 346 of file ev-toolbar.c.

347 {
348  g_return_if_fail (EV_IS_TOOLBAR (ev_toolbar));
349 
350  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ev_toolbar->priv->action_menu_button),
351  TRUE);
352 }

+ Here is the caller graph for this function:

EvToolbarMode ev_toolbar_get_mode ( EvToolbar ev_toolbar)

Definition at line 408 of file ev-toolbar.c.

409 {
410  g_return_val_if_fail (EV_IS_TOOLBAR (ev_toolbar), EV_TOOLBAR_MODE_NORMAL);
411 
412  return ev_toolbar->priv->toolbar_mode;
413 }

+ Here is the caller graph for this function:

GtkWidget* ev_toolbar_get_page_selector ( EvToolbar ev_toolbar)

Definition at line 355 of file ev-toolbar.c.

356 {
357  g_return_val_if_fail (EV_IS_TOOLBAR (ev_toolbar), NULL);
358 
359  return ev_toolbar->priv->page_selector;
360 }

+ Here is the caller graph for this function:

GType ev_toolbar_get_type ( void  )
gboolean ev_toolbar_has_visible_popups ( EvToolbar ev_toolbar)

Definition at line 319 of file ev-toolbar.c.

320 {
321  GtkPopover *popover;
322  EvToolbarPrivate *priv;
323 
324  g_return_val_if_fail (EV_IS_TOOLBAR (ev_toolbar), FALSE);
325 
326  priv = ev_toolbar->priv;
327 
328  popover = gtk_menu_button_get_popover (GTK_MENU_BUTTON (priv->view_menu_button));
329  if (gtk_widget_get_visible (GTK_WIDGET (popover)))
330  return TRUE;
331 
332  popover = gtk_menu_button_get_popover (GTK_MENU_BUTTON (priv->action_menu_button));
333  if (gtk_widget_get_visible (GTK_WIDGET (popover)))
334  return TRUE;
335 
337  return TRUE;
338 
340  return TRUE;
341 
342  return FALSE;
343 }

+ Here is the caller graph for this function:

GtkWidget* ev_toolbar_new ( EvWindow window)

Definition at line 309 of file ev-toolbar.c.

310 {
311  g_return_val_if_fail (EV_IS_WINDOW (window), NULL);
312 
313  return GTK_WIDGET (g_object_new (EV_TYPE_TOOLBAR,
314  "window", window,
315  NULL));
316 }

+ Here is the caller graph for this function:

void ev_toolbar_set_mode ( EvToolbar ev_toolbar,
EvToolbarMode  mode 
)

Definition at line 363 of file ev-toolbar.c.

365 {
366  EvToolbarPrivate *priv;
367 
368  g_return_if_fail (EV_IS_TOOLBAR (ev_toolbar));
369 
370  priv = ev_toolbar->priv;
371  priv->toolbar_mode = mode;
372 
373  switch (mode) {
375  gtk_widget_show (priv->view_menu_button);
376  gtk_widget_show (priv->action_menu_button);
377  gtk_widget_show (priv->history_action);
378  gtk_widget_show (priv->zoom_action);
379  gtk_widget_show (priv->page_selector);
380  gtk_widget_show (priv->find_button);
381  gtk_widget_show (priv->annots_button);
382  gtk_widget_hide (priv->open_button);
383  break;
385  gtk_widget_show (priv->view_menu_button);
386  gtk_widget_show (priv->action_menu_button);
387  gtk_widget_show (priv->history_action);
388  gtk_widget_show (priv->zoom_action);
389  gtk_widget_show (priv->page_selector);
390  gtk_widget_show (priv->find_button);
391  gtk_widget_show (priv->annots_button);
392  gtk_widget_hide (priv->open_button);
393  break;
395  gtk_widget_hide (priv->view_menu_button);
396  gtk_widget_hide (priv->action_menu_button);
397  gtk_widget_hide (priv->history_action);
398  gtk_widget_hide (priv->zoom_action);
399  gtk_widget_hide (priv->page_selector);
400  gtk_widget_hide (priv->find_button);
401  gtk_widget_hide (priv->annots_button);
402  gtk_widget_show (priv->open_button);
403  break;
404  }
405 }

+ Here is the caller graph for this function: