libgeda
|
The page system. More...
#include <config.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "libgeda_priv.h"
Go to the source code of this file.
Functions | |
static void | object_added (TOPLEVEL *toplevel, PAGE *page, OBJECT *object) |
static void | pre_object_removed (TOPLEVEL *toplevel, PAGE *page, OBJECT *object) |
PAGE * | s_page_new (TOPLEVEL *toplevel, const gchar *filename) |
create a new page object | |
void | s_page_delete (TOPLEVEL *toplevel, PAGE *page) |
delete a page and it's contents | |
void | s_page_delete_list (TOPLEVEL *toplevel) |
Deletes the list of pages of toplevel. | |
void | s_page_weak_ref (PAGE *page, void(*notify_func)(void *, void *), void *user_data) |
Add a weak reference watcher to an PAGE. | |
void | s_page_weak_unref (PAGE *page, void(*notify_func)(void *, void *), void *user_data) |
Remove a weak reference watcher from an PAGE. | |
void | s_page_add_weak_ptr (PAGE *page, void *weak_pointer_loc) |
Add a weak pointer to an PAGE. | |
void | s_page_remove_weak_ptr (PAGE *page, void *weak_pointer_loc) |
Remove a weak pointer from an PAGE. | |
void | s_page_goto (TOPLEVEL *toplevel, PAGE *p_new) |
changes the current page in toplevel | |
PAGE * | s_page_search (TOPLEVEL *toplevel, const gchar *filename) |
Search for pages by filename. | |
PAGE * | s_page_search_by_page_id (GedaPageList *list, int pid) |
Search for a page given its page id in a page list. | |
void | s_page_print_all (TOPLEVEL *toplevel) |
Print full TOPLEVEL structure. | |
gint | s_page_save_all (TOPLEVEL *toplevel) |
Saves all the pages of a TOPLEVEL object. | |
gboolean | s_page_check_changed (GedaPageList *list) |
Check if CHANGED flag is set for any page in list. | |
void | s_page_clear_changed (GedaPageList *list) |
Reset the CHANGED flag of all pages. | |
void | s_page_autosave_init (TOPLEVEL *toplevel) |
Autosave initialization function. | |
gint | s_page_autosave (TOPLEVEL *toplevel) |
Autosave callback function. | |
void | s_page_append (TOPLEVEL *toplevel, PAGE *page, OBJECT *object) |
Append an OBJECT to the PAGE. | |
void | s_page_append_list (TOPLEVEL *toplevel, PAGE *page, GList *obj_list) |
Append a GList of OBJECTs to the PAGE. | |
void | s_page_remove (TOPLEVEL *toplevel, PAGE *page, OBJECT *object) |
Remove an OBJECT from the PAGE. | |
void | s_page_replace (TOPLEVEL *toplevel, PAGE *page, OBJECT *object1, OBJECT *object2) |
Replace an OBJECT in a PAGE, in the same list position. | |
void | s_page_delete_objects (TOPLEVEL *toplevel, PAGE *page) |
Remove and free all OBJECTs from the PAGE. | |
const GList * | s_page_objects (PAGE *page) |
Return a GList of OBJECTs on the PAGE. | |
GList * | s_page_objects_in_region (TOPLEVEL *toplevel, PAGE *page, int min_x, int min_y, int max_x, int max_y) |
Find the objects in a given region. | |
GList * | s_page_objects_in_regions (TOPLEVEL *toplevel, PAGE *page, BOX *rects, int n_rects) |
Find the objects in a given region. | |
Variables | |
static gint | global_pid = 0 |
libgeda can handle multiple schematic or symbol pages. libgeda keeps track of the currently opened pages with a managed _GedaList. The currently used page is refered with an extra pointer.
Each page carries a list of the objects that are on the page. The first and the last element are referenced by the head and tail pointers.
Definition in file s_page.c.
See s_page_delete_list() to delete all pages of a toplevel
If the current page of toplevel is given as parameter page, the function sets the field page_current of the TOPLEVEL struct to NULL.
Definition at line 187 of file s_page.c.
void s_page_delete_list | ( | TOPLEVEL * | toplevel | ) |
void s_page_weak_ref | ( | PAGE * | page, |
void(*)(void *, void *) | notify_func, | ||
void * | user_data | ||
) |
[in,out] | page | Page to weak-reference. |
[in] | notify_func | Weak reference notify function. |
[in] | user_data | Data to be passed to notify_func. |
Definition at line 317 of file s_page.c.
void s_page_weak_unref | ( | PAGE * | page, |
void(*)(void *, void *) | notify_func, | ||
void * | user_data | ||
) |
[in,out] | page | Page to weak-reference. |
[in] | notify_func | Notify function to search for. |
[in] | user_data | Data to to search for. |
Definition at line 336 of file s_page.c.
void s_page_add_weak_ptr | ( | PAGE * | page, |
void * | weak_pointer_loc | ||
) |
[in,out] | page | Page to weak-reference. |
[in] | weak_pointer_loc | Memory address of a pointer. |
Definition at line 357 of file s_page.c.
void s_page_remove_weak_ptr | ( | PAGE * | page, |
void * | weak_pointer_loc | ||
) |
[in,out] | page | Page to weak-reference. |
[in] | weak_pointer_loc | Memory address of a pointer. |
Definition at line 374 of file s_page.c.
PAGE* s_page_search_by_page_id | ( | GedaPageList * | list, |
int | pid | ||
) |
[in] | list | The list of page to search the page in. |
[in] | pid | The ID of the page to find. |
void s_page_print_all | ( | TOPLEVEL * | toplevel | ) |
gint s_page_save_all | ( | TOPLEVEL * | toplevel | ) |
gboolean s_page_check_changed | ( | GedaPageList * | list | ) |
void s_page_clear_changed | ( | GedaPageList * | list | ) |
void s_page_autosave_init | ( | TOPLEVEL * | toplevel | ) |
gint s_page_autosave | ( | TOPLEVEL * | toplevel | ) |
[in] | toplevel | The TOPLEVEL object. |
[in] | toplevel | The TOPLEVEL object. |
[in] | page | The PAGE the object is being added to. |
[in] | object | The OBJECT being added to the page. |
Definition at line 633 of file s_page.c.
[in] | toplevel | The TOPLEVEL object. |
[in] | page | The PAGE the objects are being added to. |
[in] | obj_list | The OBJECT list being added to the page. |
Definition at line 649 of file s_page.c.
[in] | toplevel | The TOPLEVEL object. |
[in] | page | The PAGE the object is being removed from. |
[in] | object | The OBJECT being removed from the page. |
Definition at line 668 of file s_page.c.
[in] | toplevel | The TOPLEVEL object. |
[in] | page | The PAGE to be modified. |
[in] | object1 | The OBJECT being removed from the page. |
[in] | object2 | The OBJECT being added to the page. |
Definition at line 687 of file s_page.c.
const GList* s_page_objects | ( | PAGE * | page | ) |
GList* s_page_objects_in_region | ( | TOPLEVEL * | toplevel, |
PAGE * | page, | ||
int | min_x, | ||
int | min_y, | ||
int | max_x, | ||
int | max_y | ||
) |
[in] | toplevel | The TOPLEVEL object. |
[in] | page | The PAGE to find objects on. |
[in] | min_x | The smaller X coordinate of the region. |
[in] | min_y | The smaller Y coordinate of the region. |
[in] | max_x | The larger X coordinate of the region. |
[in] | max_y | The larger Y coordinate of the region. |
Definition at line 754 of file s_page.c.
[in] | toplevel | The TOPLEVEL object. |
[in] | page | The PAGE to find objects on. |
[in] | rects | The BOX regions to check. |
[in] | n_rects | The number of regions. |
Definition at line 779 of file s_page.c.
gint global_pid = 0 [static] |