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-annotation-properties-dialog.h File Reference
#include <gtk/gtk.h>
#include <glib-object.h>
#include <evince-document.h>
+ Include dependency graph for ev-annotation-properties-dialog.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EV_TYPE_ANNOTATION_PROPERTIES_DIALOG   (ev_annotation_properties_dialog_get_type())
 
#define EV_ANNOTATION_PROPERTIES_DIALOG(o)   (G_TYPE_CHECK_INSTANCE_CAST((o), EV_TYPE_ANNOTATION_PROPERTIES_DIALOG, EvAnnotationPropertiesDialog))
 
#define EV_ANNOTATION_PROPERTIES_DIALOG_CLASS(k)   (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_ANNOTATION_PROPERTIES_DIALOG, EvAnnotationPropertiesDialogClass))
 
#define EV_IS_ANNOTATION_PROPERTIES_DIALOG(o)   (G_TYPE_CHECK_INSTANCE_TYPE((o), EV_TYPE_ANNOTATION_PROPERTIES_DIALOG))
 
#define EV_IS_ANNOTATION_PROPERTIES_DIALOG_CLASS(k)   (G_TYPE_CHECK_CLASS_TYPE((k), EV_TYPE_ANNOTATION_PROPERTIES_DIALOG))
 
#define EV_ANNOTATION_PROPERTIES_DIALOG_GET_CLASS(o)   (G_TYPE_INSTANCE_GET_CLASS((o), EV_TYPE_ANNOTATION_PROPERTIES_DIALOG, EvAnnotationPropertiesDialogClass))
 

Typedefs

typedef struct
_EvAnnotationPropertiesDialog 
EvAnnotationPropertiesDialog
 
typedef struct
_EvAnnotationPropertiesDialogClass 
EvAnnotationPropertiesDialogClass
 

Functions

GType ev_annotation_properties_dialog_get_type (void) G_GNUC_CONST
 
GtkWidget * ev_annotation_properties_dialog_new (EvAnnotationType annot_type)
 
GtkWidget * ev_annotation_properties_dialog_new_with_annotation (EvAnnotation *annot)
 
const gchar * ev_annotation_properties_dialog_get_author (EvAnnotationPropertiesDialog *dialog)
 
void ev_annotation_properties_dialog_get_rgba (EvAnnotationPropertiesDialog *dialog, GdkRGBA *rgba)
 
gdouble ev_annotation_properties_dialog_get_opacity (EvAnnotationPropertiesDialog *dialog)
 
gboolean ev_annotation_properties_dialog_get_popup_is_open (EvAnnotationPropertiesDialog *dialog)
 
EvAnnotationTextIcon ev_annotation_properties_dialog_get_text_icon (EvAnnotationPropertiesDialog *dialog)
 
EvAnnotationTextMarkupType ev_annotation_properties_dialog_get_text_markup_type (EvAnnotationPropertiesDialog *dialog)
 

Macro Definition Documentation

#define EV_ANNOTATION_PROPERTIES_DIALOG (   o)    (G_TYPE_CHECK_INSTANCE_CAST((o), EV_TYPE_ANNOTATION_PROPERTIES_DIALOG, EvAnnotationPropertiesDialog))

Definition at line 32 of file ev-annotation-properties-dialog.h.

#define EV_ANNOTATION_PROPERTIES_DIALOG_CLASS (   k)    (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_ANNOTATION_PROPERTIES_DIALOG, EvAnnotationPropertiesDialogClass))

Definition at line 33 of file ev-annotation-properties-dialog.h.

#define EV_ANNOTATION_PROPERTIES_DIALOG_GET_CLASS (   o)    (G_TYPE_INSTANCE_GET_CLASS((o), EV_TYPE_ANNOTATION_PROPERTIES_DIALOG, EvAnnotationPropertiesDialogClass))

Definition at line 36 of file ev-annotation-properties-dialog.h.

#define EV_IS_ANNOTATION_PROPERTIES_DIALOG (   o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), EV_TYPE_ANNOTATION_PROPERTIES_DIALOG))

Definition at line 34 of file ev-annotation-properties-dialog.h.

#define EV_IS_ANNOTATION_PROPERTIES_DIALOG_CLASS (   k)    (G_TYPE_CHECK_CLASS_TYPE((k), EV_TYPE_ANNOTATION_PROPERTIES_DIALOG))

Definition at line 35 of file ev-annotation-properties-dialog.h.

#define EV_TYPE_ANNOTATION_PROPERTIES_DIALOG   (ev_annotation_properties_dialog_get_type())

Definition at line 31 of file ev-annotation-properties-dialog.h.

Typedef Documentation

Function Documentation

const gchar* ev_annotation_properties_dialog_get_author ( EvAnnotationPropertiesDialog dialog)

Definition at line 288 of file ev-annotation-properties-dialog.c.

289 {
290  return gtk_entry_get_text (GTK_ENTRY (dialog->author));
291 }

+ Here is the caller graph for this function:

gdouble ev_annotation_properties_dialog_get_opacity ( EvAnnotationPropertiesDialog dialog)

Definition at line 301 of file ev-annotation-properties-dialog.c.

302 {
303  return gtk_range_get_value (GTK_RANGE (dialog->opacity)) / 100;
304 }

+ Here is the caller graph for this function:

gboolean ev_annotation_properties_dialog_get_popup_is_open ( EvAnnotationPropertiesDialog dialog)

Definition at line 307 of file ev-annotation-properties-dialog.c.

308 {
309  return gtk_combo_box_get_active (GTK_COMBO_BOX (dialog->popup_state)) == 0;
310 }

+ Here is the caller graph for this function:

void ev_annotation_properties_dialog_get_rgba ( EvAnnotationPropertiesDialog dialog,
GdkRGBA *  rgba 
)

Definition at line 294 of file ev-annotation-properties-dialog.c.

296 {
297  gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (dialog->color), rgba);
298 }

+ Here is the caller graph for this function:

EvAnnotationTextIcon ev_annotation_properties_dialog_get_text_icon ( EvAnnotationPropertiesDialog dialog)

Definition at line 313 of file ev-annotation-properties-dialog.c.

314 {
315  return gtk_combo_box_get_active (GTK_COMBO_BOX (dialog->icon));
316 }

+ Here is the caller graph for this function:

EvAnnotationTextMarkupType ev_annotation_properties_dialog_get_text_markup_type ( EvAnnotationPropertiesDialog dialog)

Definition at line 319 of file ev-annotation-properties-dialog.c.

320 {
321  return gtk_combo_box_get_active (GTK_COMBO_BOX (dialog->text_markup_type));
322 }

+ Here is the caller graph for this function:

GType ev_annotation_properties_dialog_get_type ( void  )
GtkWidget* ev_annotation_properties_dialog_new ( EvAnnotationType  annot_type)

Definition at line 239 of file ev-annotation-properties-dialog.c.

240 {
241  return GTK_WIDGET (g_object_new (EV_TYPE_ANNOTATION_PROPERTIES_DIALOG,
242  "annot-type", annot_type,
243  NULL));
244 }

+ Here is the caller graph for this function:

GtkWidget* ev_annotation_properties_dialog_new_with_annotation ( EvAnnotation annot)

Definition at line 247 of file ev-annotation-properties-dialog.c.

248 {
250  const gchar *label;
251  gdouble opacity;
252  gboolean is_open;
253  GdkRGBA rgba;
254 
256  dialog->annot = g_object_ref (annot);
257 
259  if (label)
260  gtk_entry_set_text (GTK_ENTRY (dialog->author), label);
261 
262  ev_annotation_get_rgba (annot, &rgba);
263  gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (dialog->color), &rgba);
264 
266  gtk_range_set_value (GTK_RANGE (dialog->opacity), opacity * 100);
267 
269  gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->popup_state),
270  is_open ? 0 : 1);
271 
272  if (EV_IS_ANNOTATION_TEXT (annot)) {
273  EvAnnotationText *annot_text = EV_ANNOTATION_TEXT (annot);
274 
275  gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->icon),
276  ev_annotation_text_get_icon (annot_text));
277  } else if (EV_IS_ANNOTATION_TEXT_MARKUP (annot)) {
278  EvAnnotationTextMarkup *annot_markup = EV_ANNOTATION_TEXT_MARKUP (annot);
279 
280  gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->text_markup_type),
282  }
283 
284  return GTK_WIDGET (dialog);
285 }

+ Here is the caller graph for this function: