gschem

x_window.c File Reference

#include <config.h>
#include <missing.h>
#include <stdio.h>
#include "gschem.h"
Include dependency graph for x_window.c:

Go to the source code of this file.

Defines

#define GSCHEM_THEME_ICON_NAME   "geda-gschem"

Functions

void x_window_setup (GSCHEM_TOPLEVEL *w_current)
void x_window_setup_gc (GSCHEM_TOPLEVEL *w_current)
void x_window_free_gc (GSCHEM_TOPLEVEL *w_current)
void x_window_create_drawing (GtkWidget *drawbox, GSCHEM_TOPLEVEL *w_current)
void x_window_setup_draw_events (GSCHEM_TOPLEVEL *w_current)
static GtkWidget * x_window_stock_pixmap (const char *stock, GSCHEM_TOPLEVEL *w_current)
 Creates a new GtkImage displaying a GTK stock icon if available.
static void x_window_invoke_macro (GtkEntry *entry, void *userdata)
void x_window_create_main (GSCHEM_TOPLEVEL *w_current)
void x_window_close (GSCHEM_TOPLEVEL *w_current)
void x_window_close_all (GSCHEM_TOPLEVEL *w_current)
PAGE * x_window_open_page (GSCHEM_TOPLEVEL *w_current, const gchar *filename)
 Opens a new page from a file.
void x_window_set_current_page (GSCHEM_TOPLEVEL *w_current, PAGE *page)
 Changes the current page.
gint x_window_save_page (GSCHEM_TOPLEVEL *w_current, PAGE *page, const gchar *filename)
 Saves a page to a file.
void x_window_close_page (GSCHEM_TOPLEVEL *w_current, PAGE *page)
 Closes a page.
void x_window_set_default_icon (void)
 Setup default icon for GTK windows.

Define Documentation

#define GSCHEM_THEME_ICON_NAME   "geda-gschem"

Definition at line 31 of file x_window.c.


Function Documentation

void x_window_setup ( GSCHEM_TOPLEVEL w_current)
Todo:
Finish function documentation!!!
Function Description

Definition at line 38 of file x_window.c.

Here is the call graph for this function:

void x_window_setup_gc ( GSCHEM_TOPLEVEL w_current)
Todo:
Finish function documentation!!!
Function Description

Definition at line 77 of file x_window.c.

void x_window_free_gc ( GSCHEM_TOPLEVEL w_current)
Todo:
Finish function documentation!!!
Function Description

Definition at line 92 of file x_window.c.

void x_window_create_drawing ( GtkWidget *  drawbox,
GSCHEM_TOPLEVEL w_current 
)
Todo:
Finish function documentation!!!
Function Description

Definition at line 102 of file x_window.c.

void x_window_setup_draw_events ( GSCHEM_TOPLEVEL w_current)
Todo:
Finish function documentation!!!
Function Description

Definition at line 130 of file x_window.c.

Here is the call graph for this function:

static GtkWidget* x_window_stock_pixmap ( const char *  stock,
GSCHEM_TOPLEVEL w_current 
) [static]

If a stock GTK icon with the requested name was not found, this function falls back to the bitmap icons provided in the distribution.

Parameters:
stockName of the stock icon ("new", "open", etc.)
w_currentSchematic top level
Returns:
Pointer to the new GtkImage object.

Definition at line 186 of file x_window.c.

static void x_window_invoke_macro ( GtkEntry *  entry,
void *  userdata 
) [static]

Definition at line 225 of file x_window.c.

Here is the call graph for this function:

void x_window_create_main ( GSCHEM_TOPLEVEL w_current)
Todo:
Finish function documentation!!!
Function Description

Definition at line 247 of file x_window.c.

Here is the call graph for this function:

void x_window_close ( GSCHEM_TOPLEVEL w_current)
Todo:
Finish function documentation!!!
Function Description

Definition at line 543 of file x_window.c.

Here is the call graph for this function:

void x_window_close_all ( GSCHEM_TOPLEVEL w_current)
Todo:
Finish function documentation!!!
Function Description

Definition at line 662 of file x_window.c.

Here is the call graph for this function:

PAGE* x_window_open_page ( GSCHEM_TOPLEVEL w_current,
const gchar *  filename 
)
Function Description
This function opens the file whose name is filename in a new PAGE of toplevel.

If there is no page for filename in toplevel's list of pages, it creates a new PAGE, loads the file in it and returns a pointer on the new page. Otherwise it returns a pointer on the existing page.

If the filename passed is NULL, this function creates an empty, untitled page. The name of the untitled page is build from configuration data ('untitled-name') and a counter for uniqueness.

The opened page becomes the current page of toplevel.

Parameters:
[in]w_currentThe toplevel environment.
[in]filenameThe name of the file to open or NULL for a blank page.
Returns:
A pointer on the new page.
Bug:
This code should check to make sure any untitled filename does not conflict with a file on disk.

Definition at line 700 of file x_window.c.

Here is the call graph for this function:

void x_window_set_current_page ( GSCHEM_TOPLEVEL w_current,
PAGE *  page 
)
Function Description
This function displays the specified page page in the window attached to toplevel.

It changes the toplevel's current page to page, draws it and updates the user interface.

page has to be in the list of PAGEs attached to toplevel.

Parameters:
[in]w_currentThe toplevel environment.
[in]pageThe page to become current page.

Definition at line 800 of file x_window.c.

Here is the call graph for this function:

gint x_window_save_page ( GSCHEM_TOPLEVEL w_current,
PAGE *  page,
const gchar *  filename 
)
Function Description
This function saves the page page to a file named filename.

It returns the value returned by function f_save() trying to save page page to file filename (1 on success, 0 on failure).

page may not be the current page of toplevel. The current page of toplevel is not affected by this function.

Parameters:
[in]w_currentThe toplevel environment.
[in]pageThe page to save.
[in]filenameThe name of the file in which to save page.
Returns:
1 on success, 0 otherwise.

Definition at line 842 of file x_window.c.

Here is the call graph for this function:

void x_window_close_page ( GSCHEM_TOPLEVEL w_current,
PAGE *  page 
)
Function Description
This function closes the page page of toplevel toplevel.

If necessary, the current page of toplevel is changed to the next valid page or to a new untitled page.

Parameters:
[in]w_currentThe toplevel environment.
[in]pageThe page to close.

Definition at line 921 of file x_window.c.

Here is the call graph for this function:

void x_window_set_default_icon ( void  )
Function Description
Sets the default window icon by name, to be found in the current icon theme. The name used is #defined above as GSCHEM_THEME_ICON_NAME.

Definition at line 987 of file x_window.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines