Palette_edit Class Reference

#include <paledit.h>

Inheritance diagram for Palette_edit:

Inheritance graph
[legend]
Collaboration diagram for Palette_edit:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Palette_edit (Flex_file_info *flinfo)
 ~Palette_edit ()
void show_palette (int palnum)
void unselect (bool need_render=true)
void move_palette (bool up)
void add_palette ()
void remove_palette ()

Static Public Member Functions

static gint configure (GtkWidget *widget, GdkEventConfigure *event, gpointer data)
static gint expose (GtkWidget *widget, GdkEventExpose *event, gpointer data)
static gint mouse_press (GtkWidget *widget, GdkEventButton *event, gpointer data)
static void drag_data_get (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *data, guint info, guint time, gpointer data)
static gint selection_clear (GtkWidget *widget, GdkEventSelection *event, gpointer data)
static gint drag_begin (GtkWidget *widget, GdkDragContext *context, gpointer data)
static void palnum_changed (GtkAdjustment *adj, gpointer data)
static void export_palette (char *fname, gpointer user_data)
static void import_palette (char *fname, gpointer user_data)

Private Member Functions

virtual void show (int x, int y, int w, int h)
virtual void show ()
void select (int new_sel)
virtual void load ()
virtual void render ()
void double_clicked ()
GtkWidget * create_controls ()
void enable_controls ()
void setup ()
void new_palette ()
void update_flex (int pnum)

Static Private Member Functions

static int color_closed (GtkWidget *widget, GdkEvent *event, gpointer data)
static void color_cancel (GtkWidget *widget, gpointer data)
static void color_okay (GtkWidget *widget, gpointer data)

Private Attributes

Flex_file_infoflex_info
guchar * image
int width
int height
GtkWidget * draw
GdkGC * drawgc
std::vector< GdkRgbCmap * > palettes
int cur_pal
GtkColorSelectionDialog * colorsel
GtkWidget * sbar
GtkWidget * pspin
GtkAdjustment * palnum_adj
guint sbar_sel
Rectangle selected_box
GtkWidget * insert_btn
GtkWidget * remove_btn
GtkWidget * up_btn
GtkWidget * down_btn

Detailed Description

Definition at line 39 of file paledit.h.


Constructor & Destructor Documentation

Palette_edit::Palette_edit ( Flex_file_info flinfo  ) 

Definition at line 779 of file paledit.cc.

Palette_edit::~Palette_edit (  ) 

Definition at line 794 of file paledit.cc.


Member Function Documentation

void Palette_edit::show ( int  x,
int  y,
int  w,
int  h 
) [inline, private, virtual]

Implements Object_browser.

Definition at line 81 of file paledit.cc.

Referenced by color_okay(), expose(), import_palette(), mouse_press(), and palnum_changed().

virtual void Palette_edit::show (  )  [inline, private, virtual]

Implements Object_browser.

Definition at line 57 of file paledit.h.

References draw.

void Palette_edit::select ( int  new_sel  )  [private]

Definition at line 103 of file paledit.cc.

void Palette_edit::load (  )  [private, virtual]

Reimplemented from Object_browser.

Definition at line 120 of file paledit.cc.

References len.

void Palette_edit::render (  )  [private, virtual]

Implements Object_browser.

Definition at line 153 of file paledit.cc.

References height, and width.

Referenced by color_okay(), configure(), import_palette(), mouse_press(), and palnum_changed().

int Palette_edit::color_closed ( GtkWidget *  widget,
GdkEvent *  event,
gpointer  data 
) [static, private]

Definition at line 208 of file paledit.cc.

References colorsel.

void Palette_edit::color_cancel ( GtkWidget *  widget,
gpointer  data 
) [static, private]

Definition at line 225 of file paledit.cc.

References colorsel.

void Palette_edit::color_okay ( GtkWidget *  widget,
gpointer  data 
) [static, private]

Definition at line 241 of file paledit.cc.

References colorsel, cur_pal, palettes, render(), Object_browser::selected, show(), and update_flex().

Here is the call graph for this function:

void Palette_edit::double_clicked (  )  [private]

Definition at line 273 of file paledit.cc.

Referenced by mouse_press().

GtkWidget * Palette_edit::create_controls (  )  [private]

Definition at line 541 of file paledit.cc.

References Ucscript::frame, on_down_btn_clicked(), on_exportbtn_clicked(), on_importbtn_clicked(), on_insert_btn_clicked(), on_remove_btn_clicked(), and on_up_btn_clicked().

Here is the call graph for this function:

void Palette_edit::enable_controls (  )  [private]

Definition at line 648 of file paledit.cc.

Referenced by palnum_changed().

void Palette_edit::setup (  )  [private]

Definition at line 674 of file paledit.cc.

References Ucscript::frame.

void Palette_edit::new_palette (  )  [private]

Definition at line 744 of file paledit.cc.

void Palette_edit::update_flex ( int  pnum  )  [private]

Definition at line 763 of file paledit.cc.

References Write_palette().

Referenced by color_okay(), and import_palette().

Here is the call graph for this function:

void Palette_edit::show_palette ( int  palnum  ) 

Definition at line 809 of file paledit.cc.

Referenced by palnum_changed().

void Palette_edit::unselect ( bool  need_render = true  ) 

Definition at line 821 of file paledit.cc.

void Palette_edit::move_palette ( bool  up  ) 

Definition at line 841 of file paledit.cc.

Referenced by on_down_btn_clicked(), and on_up_btn_clicked().

void Palette_edit::add_palette (  ) 

Definition at line 893 of file paledit.cc.

References Update_range_upper().

Referenced by on_insert_btn_clicked().

Here is the call graph for this function:

void Palette_edit::remove_palette (  ) 

Definition at line 908 of file paledit.cc.

References EStudio::Prompt(), and Update_range_upper().

Referenced by on_remove_btn_clicked().

Here is the call graph for this function:

gint Palette_edit::configure ( GtkWidget *  widget,
GdkEventConfigure *  event,
gpointer  data 
) [static]

Definition at line 307 of file paledit.cc.

References drawgc, render(), and width.

Here is the call graph for this function:

gint Palette_edit::expose ( GtkWidget *  widget,
GdkEventExpose *  event,
gpointer  data 
) [static]

Definition at line 330 of file paledit.cc.

References show().

Here is the call graph for this function:

gint Palette_edit::mouse_press ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  data 
) [static]

Definition at line 347 of file paledit.cc.

References colorsel, Object_browser::create_popup(), double_clicked(), height, height, render(), Object_browser::selected, show(), width, and width.

Here is the call graph for this function:

void Palette_edit::drag_data_get ( GtkWidget *  widget,
GdkDragContext *  context,
GtkSelectionData *  data,
guint  info,
guint  time,
gpointer  data 
) [static]

Definition at line 400 of file paledit.cc.

References file, len, Object_browser::selected, Store_u7_shapeid(), U7_SHAPE_SHAPES, U7_TARGET_SHAPEID, and U7_TARGET_SHAPEID_NAME.

Here is the call graph for this function:

gint Palette_edit::selection_clear ( GtkWidget *  widget,
GdkEventSelection *  event,
gpointer  data 
) [static]

Definition at line 436 of file paledit.cc.

gint Palette_edit::drag_begin ( GtkWidget *  widget,
GdkDragContext *  context,
gpointer  data 
) [static]

Definition at line 452 of file paledit.cc.

void Palette_edit::palnum_changed ( GtkAdjustment *  adj,
gpointer  data 
) [static]

Definition at line 469 of file paledit.cc.

References enable_controls(), render(), show(), and show_palette().

Here is the call graph for this function:

void Palette_edit::export_palette ( char *  fname,
gpointer  user_data 
) [static]

Definition at line 936 of file paledit.cc.

References cur_pal, palettes, EStudio::Prompt(), and U7exists().

Referenced by on_exportbtn_clicked().

Here is the call graph for this function:

void Palette_edit::import_palette ( char *  fname,
gpointer  user_data 
) [static]

Definition at line 976 of file paledit.cc.

References EStudio::Alert(), cur_pal, palettes, EStudio::Prompt(), render(), show(), and update_flex().

Referenced by on_importbtn_clicked().

Here is the call graph for this function:


Member Data Documentation

Flex_file_info* Palette_edit::flex_info [private]

Definition at line 41 of file paledit.h.

guchar* Palette_edit::image [private]

Definition at line 42 of file paledit.h.

int Palette_edit::width [private]

Definition at line 43 of file paledit.h.

Referenced by configure(), and mouse_press().

int Palette_edit::height [private]

Definition at line 43 of file paledit.h.

Referenced by mouse_press().

GtkWidget* Palette_edit::draw [private]

Definition at line 44 of file paledit.h.

Referenced by show().

GdkGC* Palette_edit::drawgc [private]

Definition at line 45 of file paledit.h.

Referenced by configure().

std::vector<GdkRgbCmap*> Palette_edit::palettes [private]

Definition at line 46 of file paledit.h.

Referenced by color_okay(), export_palette(), and import_palette().

int Palette_edit::cur_pal [private]

Definition at line 47 of file paledit.h.

Referenced by color_okay(), export_palette(), and import_palette().

GtkColorSelectionDialog* Palette_edit::colorsel [private]

Definition at line 48 of file paledit.h.

Referenced by color_cancel(), color_closed(), color_okay(), and mouse_press().

GtkWidget* Palette_edit::sbar [private]

Definition at line 49 of file paledit.h.

GtkWidget* Palette_edit::pspin [private]

Definition at line 50 of file paledit.h.

GtkAdjustment* Palette_edit::palnum_adj [private]

Definition at line 51 of file paledit.h.

guint Palette_edit::sbar_sel [private]

Definition at line 52 of file paledit.h.

Rectangle Palette_edit::selected_box [private]

Definition at line 53 of file paledit.h.

GtkWidget* Palette_edit::insert_btn [private]

Definition at line 54 of file paledit.h.

GtkWidget * Palette_edit::remove_btn [private]

Definition at line 54 of file paledit.h.

GtkWidget * Palette_edit::up_btn [private]

Definition at line 54 of file paledit.h.

GtkWidget * Palette_edit::down_btn [private]

Definition at line 54 of file paledit.h.


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 15:01:10 2007 for ExultEngine by  doxygen 1.5.1