shapelst.cc File Reference

#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <glib.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
#include "shapelst.h"
#include "shapevga.h"
#include "ibuf8.h"
#include "Flex.h"
#include "u7drag.h"
#include "studio.h"
#include "utils.h"
#include "shapegroup.h"
#include "shapefile.h"
#include "pngio.h"
#include "fontgen.h"

Include dependency graph for shapelst.cc:

Go to the source code of this file.

Classes

class  Editing_file

Functions

static void Shape_dropped_here (int file, int shape, int frame, void *udata)
static int Get_max_height (Shape *shape)
static int Get_x_offset (Shape *shape, int framenum)
static gint Configure_chooser (GtkWidget *widget, GdkEventConfigure *event, gpointer data)
static gint Mouse_press (GtkWidget *widget, GdkEventButton *event, gpointer data)
static gint Mouse_release (GtkWidget *widget, GdkEventButton *event, gpointer data)
gboolean on_draw_key_press (GtkEntry *entry, GdkEventKey *event, gpointer user_data)
static void Get_rgb_palette (GdkRgbCmap *palette, unsigned char *buf)
static int Find_closest_color (unsigned char *pal, int r, int g, int b)
static void Convert_indexed_image (unsigned char *pixels, int count, unsigned char *oldpal, int oldpalsize, unsigned char *newpal)
static void Import_png (const char *fname, Shape_file_info *finfo, unsigned char *pal, int shapenum, int framenum)
static void Import_png_tiles (const char *fname, Shape_file_info *finfo, unsigned char *pal, int shapenum, int tiles, bool bycols)
void on_new_shape_okay_clicked (GtkButton *button, gpointer user_data)
void on_new_shape_font_toggled (GtkToggleButton *btn, gpointer user_data)
gboolean on_new_shape_font_color_draw_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer data)
void on_new_shape_font_color_changed (GtkSpinButton *button, gpointer user_data)
static void font_file_chosen (const char *fname, gpointer user_data)
static void on_shapes_popup_import (GtkMenuItem *item, gpointer udata)
static void on_shapes_popup_export (GtkMenuItem *item, gpointer udata)
static void on_shapes_popup_new_frame (GtkMenuItem *item, gpointer udata)
static void on_shapes_popup_new_shape (GtkMenuItem *item, gpointer udata)
void on_export_tiles_okay_clicked (GtkButton *button, gpointer user_data)

Variables

const int border = 4
const unsigned char transp = 255


Function Documentation

static gint Configure_chooser ( GtkWidget *  widget,
GdkEventConfigure *  event,
gpointer  data 
) [static]

Definition at line 542 of file shapelst.cc.

References Shape_chooser::configure().

Referenced by Shape_chooser::Shape_chooser().

Here is the call graph for this function:

static void Convert_indexed_image ( unsigned char *  pixels,
int  count,
unsigned char *  oldpal,
int  oldpalsize,
unsigned char *  newpal 
) [static]

Definition at line 1078 of file shapelst.cc.

References Find_closest_color().

Referenced by Import_png(), and Import_png_tiles().

Here is the call graph for this function:

static int Find_closest_color ( unsigned char *  pal,
int  r,
int  g,
int  b 
) [static]

Definition at line 1050 of file shapelst.cc.

Referenced by Convert_indexed_image().

static void font_file_chosen ( const char *  fname,
gpointer  user_data 
) [static]

Definition at line 1459 of file shapelst.cc.

References ExultStudio::get_instance(), ExultStudio::set_entry(), and ExultStudio::set_spin().

Referenced by Shape_chooser::from_font_toggled().

Here is the call graph for this function:

static int Get_max_height ( Shape shape  )  [static]

Definition at line 280 of file shapelst.cc.

References Shape::get_frame(), Shape_frame::get_height(), and Shape::get_num_frames().

Referenced by Shape_chooser::render_frames().

Here is the call graph for this function:

static void Get_rgb_palette ( GdkRgbCmap *  palette,
unsigned char *  buf 
) [static]

Definition at line 795 of file shapelst.cc.

Referenced by Shape_chooser::export_png(), and Shape_chooser::import_frame().

static int Get_x_offset ( Shape shape,
int  framenum 
) [static]

Definition at line 303 of file shapelst.cc.

References Shape::get_frame(), Shape::get_num_frames(), and Shape_frame::get_width().

Referenced by Shape_chooser::scroll_to_frame().

Here is the call graph for this function:

static void Import_png ( const char *  fname,
Shape_file_info finfo,
unsigned char *  pal,
int  shapenum,
int  framenum 
) [static]

Definition at line 1108 of file shapelst.cc.

References Convert_indexed_image(), Vga_file::extract_shape(), Shape_file_info::get_ifile(), ExultStudio::get_instance(), ExultStudio::get_vgafile(), ExultStudio::prompt(), and Shape::set_frame().

Referenced by Shape_chooser::import_frame(), and Shape_chooser::read_back_edited().

Here is the call graph for this function:

static void Import_png_tiles ( const char *  fname,
Shape_file_info finfo,
unsigned char *  pal,
int  shapenum,
int  tiles,
bool  bycols 
) [static]

Definition at line 1163 of file shapelst.cc.

References EStudio::Alert(), Convert_indexed_image(), Vga_file::extract_shape(), Shape_file_info::get_ifile(), ExultStudio::get_instance(), Shape::get_num_frames(), Shape::set_frame(), and Shape_file_info::set_modified().

Referenced by Shape_chooser::read_back_edited().

Here is the call graph for this function:

static gint Mouse_press ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  data 
) [static]

Definition at line 719 of file shapelst.cc.

References Shape_chooser::mouse_press().

Referenced by Shape_chooser::Shape_chooser().

Here is the call graph for this function:

static gint Mouse_release ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  data 
) [static]

Definition at line 729 of file shapelst.cc.

References Shape_draw::mouse_up().

Here is the call graph for this function:

gboolean on_draw_key_press ( GtkEntry *  entry,
GdkEventKey *  event,
gpointer  user_data 
)

Definition at line 743 of file shapelst.cc.

References Shape_chooser::del_frame(), and Shape_chooser::new_frame().

Referenced by Shape_chooser::Shape_chooser().

Here is the call graph for this function:

void on_export_tiles_okay_clicked ( GtkButton *  button,
gpointer  user_data 
)

Definition at line 1995 of file shapelst.cc.

References Shape_chooser::edit_shape(), ExultStudio::get_instance(), ExultStudio::get_spin(), and ExultStudio::get_toggle().

Here is the call graph for this function:

void on_new_shape_font_color_changed ( GtkSpinButton *  button,
gpointer  user_data 
)

Definition at line 1440 of file shapelst.cc.

References ExultStudio::get_instance(), and ExultStudio::get_xml().

Here is the call graph for this function:

gboolean on_new_shape_font_color_draw_expose_event ( GtkWidget *  widget,
GdkEventExpose *  event,
gpointer  data 
)

Definition at line 1416 of file shapelst.cc.

References Shape_draw::get_color(), ExultStudio::get_instance(), and ExultStudio::get_spin().

Here is the call graph for this function:

void on_new_shape_font_toggled ( GtkToggleButton *  btn,
gpointer  user_data 
)

Definition at line 1404 of file shapelst.cc.

References Shape_chooser::from_font_toggled().

Here is the call graph for this function:

void on_new_shape_okay_clicked ( GtkButton *  button,
gpointer  user_data 
)

Definition at line 1393 of file shapelst.cc.

References Shape_chooser::create_new_shape().

Here is the call graph for this function:

static void on_shapes_popup_export ( GtkMenuItem *  item,
gpointer  udata 
) [static]

Definition at line 1963 of file shapelst.cc.

References Create_file_selection(), and Shape_chooser::export_frame().

Referenced by Shape_chooser::create_popup().

Here is the call graph for this function:

static void on_shapes_popup_import ( GtkMenuItem *  item,
gpointer  udata 
) [static]

Definition at line 1951 of file shapelst.cc.

References Create_file_selection(), and Shape_chooser::import_frame().

Referenced by Shape_chooser::create_popup().

Here is the call graph for this function:

static void on_shapes_popup_new_frame ( GtkMenuItem *  item,
gpointer  udata 
) [static]

Definition at line 1975 of file shapelst.cc.

Referenced by Shape_chooser::create_popup().

static void on_shapes_popup_new_shape ( GtkMenuItem *  item,
gpointer  udata 
) [static]

Definition at line 1983 of file shapelst.cc.

Referenced by Shape_chooser::create_popup().

static void Shape_dropped_here ( int  file,
int  shape,
int  frame,
void *  udata 
) [static]

Definition at line 99 of file shapelst.cc.

Referenced by Shape_chooser::configure().


Variable Documentation

const int border = 4

Definition at line 185 of file shapelst.cc.

const unsigned char transp = 255

Definition at line 760 of file shapelst.cc.


Generated on Mon Jul 9 14:44:59 2007 for ExultEngine by  doxygen 1.5.1