GnuCash  4.11-11-ge9df8d41d2+
Macros | Functions
gnc-state.h File Reference

Functions to load, save and get gui state. More...

#include "qof.h"

Go to the source code of this file.

Macros

#define STATE_FILE_TOP   "Top"
 
#define STATE_FILE_BOOK_GUID   "BookGuid"
 
#define STATE_FILE_EXT   ".gcm"
 

Functions

GKeyFile * gnc_state_load (const QofSession *session)
 Load the state from a state file on disk for the given session. More...
 
void gnc_state_save (const QofSession *session)
 Save the state to a state file on disk for the given session. More...
 
GKeyFile * gnc_state_get_current (void)
 Returns a pointer to the most recently loaded state. More...
 
gint gnc_state_drop_sections_for (const gchar *partial_name)
 Drop all sections from the state file whose name contains partial_name. More...
 

Detailed Description

Functions to load, save and get gui state.

Author
Copyright (C) 1997 Robin D. Clark
Copyright (C) 1998 Linas Vepstas
Copyright (C) 1998 Rob Browning
Copyright (C) 2004 Derek Atkins derek.nosp@m.@iht.nosp@m.fp.co.nosp@m.m
Copyright (C) 2013 Geert Janssens geert.nosp@m.@kob.nosp@m.altwi.nosp@m.t.be

The state of the gui (number of open windows, number of open pages in each window, window positions and sizes, page content of open pages,...) is loaded/saved from to a file when opening/closing a book. These functions help in loading/saving from/to the appropriate state file for a given session.

Note that each gui component is responsible itself to actually add/read its state to/from the state file. The functions in gnc-state only help to link the in-memory state file to an actual file on disk.

Definition in file gnc-state.h.