#include <paledit.h>
Inheritance diagram for Palette_edit:
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_info * | flex_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 |
Definition at line 39 of file paledit.h.
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.
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] |
void Palette_edit::select | ( | int | new_sel | ) | [private] |
Definition at line 103 of file paledit.cc.
void Palette_edit::load | ( | ) | [private, virtual] |
void Palette_edit::render | ( | ) | [private, virtual] |
Implements Object_browser.
Definition at line 153 of file paledit.cc.
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] |
void Palette_edit::color_cancel | ( | GtkWidget * | widget, | |
gpointer | data | |||
) | [static, private] |
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] |
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] |
void Palette_edit::setup | ( | ) | [private] |
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 | ) |
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:
Flex_file_info* Palette_edit::flex_info [private] |
guchar* Palette_edit::image [private] |
int Palette_edit::width [private] |
int Palette_edit::height [private] |
GtkWidget* Palette_edit::draw [private] |
GdkGC* Palette_edit::drawgc [private] |
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] |
GtkWidget* Palette_edit::pspin [private] |
GtkAdjustment* Palette_edit::palnum_adj [private] |
guint Palette_edit::sbar_sel [private] |
Rectangle Palette_edit::selected_box [private] |
GtkWidget* Palette_edit::insert_btn [private] |
GtkWidget * Palette_edit::remove_btn [private] |
GtkWidget * Palette_edit::up_btn [private] |
GtkWidget * Palette_edit::down_btn [private] |