PCB-FPW developer documentation based on version: 0.0.11

Functions

filechooser_dialog.h File Reference

Header file for the filechooser dialog for pcb-gfpw (GTK UI). More...

Go to the source code of this file.

Functions

void on_filechooser_dialog_cancel_button_clicked (GtkButton *button, gpointer user_data)
 The file chooser dialog "Cancel" button is clicked.
void on_filechooser_dialog_close (GtkDialog *dialog, gpointer user_data)
 The file chooser dialog "close" signal is emitted.
void on_filechooser_dialog_current_folder_changed (GtkFileChooser *filechooser, gpointer user_data)
 The file chooser dialog "current folder changed" signal is emitted.
void on_filechooser_dialog_open_button_clicked (GtkButton *button, gpointer user_data)
 The file chooser dialog "Open" button is clicked.
void on_filechooser_dialog_selection_changed (GtkFileChooser *filechooser, gpointer user_data)
 The file chooser dialog "selection changed" signal is emitted.
void on_filechooser_dialog_update_preview (GtkFileChooser *filechooser, gpointer user_data)
 The file chooser dialog "update preview" signal is emitted.
GtkWidget * create_filechooser_dialog (void)
 Create a filechooser dialog.

Detailed Description

Header file for the filechooser dialog for pcb-gfpw (GTK UI).

Author:
Copyright 2007, 2008, 2009, 2010 by Bert Timmerman <bert.timmerman@xs4all.nl> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Definition in file filechooser_dialog.h.


Function Documentation

GtkWidget* create_filechooser_dialog ( void   ) 

Create a filechooser dialog.

Parameters: void.

Returns: GtkWidget filechooser dialog.

Definition at line 310 of file filechooser_dialog.c.

References on_filechooser_dialog_cancel_button_clicked(), on_filechooser_dialog_close(), on_filechooser_dialog_current_folder_changed(), on_filechooser_dialog_open_button_clicked(), on_filechooser_dialog_selection_changed(), and on_filechooser_dialog_update_preview().

Here is the call graph for this function:

void on_filechooser_dialog_cancel_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The file chooser dialog "Cancel" button is clicked.

  • lookup the dialog widget.
  • destroy the file chooser widget.
Todo:
  • maybe restore the preview widget ?

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

  • lookup the dialog widget.
  • destroy the file chooser widget.
Todo:
  • maybe restore the preview widget ?

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

  • lookup the dialog widget.
  • destroy the file chooser widget.
Todo:
  • maybe restore the preview widget ?

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2161 of file callbacks.c.

Referenced by create_filechooser_dialog().

void on_filechooser_dialog_close ( GtkDialog *  dialog,
gpointer  user_data 
)

The file chooser dialog "close" signal is emitted.

  • lookup the dialog widget.
  • destroy the file chooser widget.

Parameters: *dialog is the caller widget.

Parameters: user_data.

Returns: none.

The file chooser dialog "close" signal is emitted.

  • lookup the dialog widget.
  • destroy the filechooser widget.

Parameters: *dialog is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2185 of file callbacks.c.

Referenced by create_filechooser_dialog().

void on_filechooser_dialog_current_folder_changed ( GtkFileChooser *  filechooser,
gpointer  user_data 
)

The file chooser dialog "current folder changed" signal is emitted.

  • lookup the dialog widget.
  • get the current folder.
  • test the current folder for null pointer or empty string and if true, please log a message and return.
  • store the (new) current folder name in temp_dir.

Parameters: *filechooser is the caller widget.

Parameters: user_data.

Returns: none.

The file chooser dialog "current folder changed" signal is emitted.

  • lookup the dialog widget.
  • get the current folder.
  • test the current folder for null pointer or empty string and if true, please log a message and return.
  • store the (new) current folder name in temp_dir.

Parameters: *filechooser is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2214 of file callbacks.c.

References temp_dir, and verbose.

Referenced by create_filechooser_dialog().

void on_filechooser_dialog_open_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The file chooser dialog "Open" button is clicked.

  • lookup the dialog widget.
  • get the selected filename.
  • test the selected filename for null pointer or empty string and if true, please log a message.
  • test if the selected filename is not a directory and if true, please log a message.
  • store the selected filename in fpw_filename.
  • duplicate the (new) current directory name from temp_dir into work_dir.
  • read new global values from the selected footprintwizard file.
  • update the entry widgets to reflect the changes.

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

The file chooser dialog "Open" button is clicked.

  • lookup the dialog widget.
  • get the selected filename.
  • test the selected filename for null pointer or empty string and if true, please log a message.
  • test if the selected filename is not a directory and if true, please log a message.
  • store the selected filename in fpw_filename.
  • duplicate the (new) current directory name from temp_dir into work_dir.
  • read new global values from the selected footprintwizard file.
  • update the entry widgets to reflect the changes.

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2278 of file callbacks.c.

References all_entries_need_updated(), read_footprintwizard_file(), temp_dir, verbose, and work_dir.

Referenced by create_filechooser_dialog().

Here is the call graph for this function:

void on_filechooser_dialog_selection_changed ( GtkFileChooser *  filechooser,
gpointer  user_data 
)

The file chooser dialog "selection changed" signal is emitted.

Todo:
  • store the selected filename in temp_fpw_filename.

- read the values from the selected footprintwizard file in a temporary set of variables temp_*.

- generate a new preview image.

- update the preview widget.

Parameters: *filechooser is the caller widget.

Parameters: user_data.

Returns: none.

Todo:
  • store the selected filename in temp_fpw_filename.

- read the values from the selected footprintwizard file in a temporary set of variables temp_*.

- generate a new preview image.

- update the preview widget.

Parameters: *filechooser is the caller widget.

Parameters: user_data.

Returns: none.

The file chooser dialog "selection changed" signal is emitted.

Todo:
  • store the selected filename in temp_fpw_filename.

- read the values from the selected footprintwizard file in a temporary set of variables temp_*.

- generate a new preview image.

- update the preview widget.

Parameters: *filechooser is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2376 of file callbacks.c.

Referenced by create_filechooser_dialog().

void on_filechooser_dialog_update_preview ( GtkFileChooser *  filechooser,
gpointer  user_data 
)

The file chooser dialog "update preview" signal is emitted.

Todo:
  • generate a new preview image.

- update the preview widget.

Parameters: *filechooser is the caller widget.

Parameters: user_data.

Returns: none.

Todo:
  • generate a new preview image.

- update the preview widget.

Parameters: *filechooser is the caller widget.

Parameters: user_data.

Returns: none.

The file chooser dialog "update preview" signal is emitted.

Todo:
  • generate a new preview image.

- update the preview widget.

Parameters: *filechooser is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2396 of file callbacks.c.

Referenced by create_filechooser_dialog().