## go-doc go-doc |

## Synopsis

    #define             GO_DOC_TYPE
    #define             GO_DOC                              (o)
    #define             IS_GO_DOC                           (o)
    GType               go_doc_get_type                     (void);
    gboolean            go_doc_is_pristine                  (GODoc const *doc);
    void                go_doc_set_dirty                    (GODoc *doc,
                                                             gboolean is_dirty);
    gboolean            go_doc_is_dirty                     (GODoc const *doc);
    gboolean            go_doc_set_uri                      (GODoc *doc,
                                                             char const *uri);
    charconst	*         go_doc_get_uri                      (GODoc const *doc);
    GsfDocMetaData*     go_doc_get_meta_data                (GODoc const *doc);
    void                go_doc_set_meta_data                (GODoc *doc,
                                                             GsfDocMetaData *data);
    void                go_doc_update_meta_data             (GODoc *doc);
    GODoc*              go_doc_new_from_input               (GsfInput *input,
                                                             GODocImporter const *fmt,
                                                             GOIOContext *context,
                                                             gchar const *encoding);
    GODoc*              go_doc_new_from_uri                 (char const *uri,
                                                             GnmFileOpener const *fmt,
                                                             GOIOContext *context,
                                                             gchar const *encoding);
    gboolean            go_doc_save                         (GODoc *doc,
                                                             GOIOContext *context);
    gboolean            go_doc_save_as                      (GODoc *doc,
                                                             GODocExporter *fmt,
                                                             char const *uri,
                                                             GOIOContext *cc);
    gboolean            go_doc_sendto                       (GODoc *doc,
                                                             GOIOContext *cc);

## Description

## Details

### GO_DOC_TYPE

    #define GO_DOC_TYPE	    (go_doc_get_type ())

### GO_DOC()

    #define GO_DOC(o)	    (G_TYPE_CHECK_INSTANCE_CAST ((o), GO_DOC_TYPE, GODoc))

`o` : |

### IS_GO_DOC()

    #define IS_GO_DOC(o)	    (G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_DOC_TYPE))

`o` : |

### go_doc_get_type ()

    GType               go_doc_get_type                     (void);

Returns : |

### go_doc_is_pristine ()

    gboolean            go_doc_is_pristine                  (GODoc const *doc);

This checks to see if the doc has ever been used ( approximately )

`doc` : |
Returns : | TRUE if we can discard this doc.

### go_doc_set_dirty ()

    void                go_doc_set_dirty                    (GODoc *doc,
                                                             gboolean is_dirty);

Changes the dirty state of `doc` to `is_dirty` and clears the pristine state no matter what.

`doc` : | GODoc
`is_dirty` : | bool

### go_doc_is_dirty ()

    gboolean            go_doc_is_dirty                     (GODoc const *doc);

`doc` : | GODoc
Returns : | TRUE if `doc` has been modified.

### go_doc_set_uri ()

    gboolean            go_doc_set_uri                      (GODoc *doc,
                                                             char const *uri);

`doc` : | the document to modify
`uri` : | the uri for this worksheet.
Returns : | TRUE if the name was set succesfully.

### go_doc_get_uri ()

    charconst	*         go_doc_get_uri                      (GODoc const *doc);

`doc` : |
Returns : |

### go_doc_get_meta_data ()

    GsfDocMetaData*     go_doc_get_meta_data                (GODoc const *doc);

`doc` : |
Returns : |

### go_doc_set_meta_data ()

    void                go_doc_set_meta_data                (GODoc *doc,
                                                             GsfDocMetaData *data);

Adds a ref to `data`.

`doc` : | GODoc
`data` : | GsfDocMetaData

### go_doc_update_meta_data ()

    void                go_doc_update_meta_data             (GODoc *doc);

Signal that `doc`'s metadata should be updated - statistics (sheet count, word count) - content (sheet names, bookmarks) - reloading linked items

`doc` : | GODoc

### go_doc_new_from_input ()

    GODoc*              go_doc_new_from_input               (GsfInput *input,
                                                             GODocImporter const *fmt,
                                                             GOIOContext *context,
                                                             gchar const *encoding);

`input` : |
`fmt` : |
`context` : |
`encoding` : |
Returns : |

### go_doc_new_from_uri ()

    GODoc*              go_doc_new_from_uri                 (char const *uri,
                                                             GnmFileOpener const *fmt,
                                                             GOIOContext *context,
                                                             gchar const *encoding);

`uri` : |
`fmt` : |
`context` : |
`encoding` : |
Returns : |

### go_doc_save ()

    gboolean            go_doc_save                         (GODoc *doc,
                                                             GOIOContext *context);

`doc` : |
`context` : |
Returns : |

### go_doc_save_as ()

    gboolean            go_doc_save_as                      (GODoc *doc,
                                                             GODocExporter *fmt,
                                                             char const *uri,
                                                             GOIOContext *cc);

`doc` : |
`fmt` : |
`uri` : |
`cc` : |
Returns : |

### go_doc_sendto ()

    gboolean            go_doc_sendto                       (GODoc *doc,
                                                             GOIOContext *cc);

`doc` : |
`cc` : |
Returns : |