2018-11-16 00:42:29 +01:00
|
|
|
/*****************************************************************************\
|
|
|
|
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
|
|
|
This file is licensed under the Snes9x License.
|
|
|
|
For further information, consult the LICENSE file in the root directory.
|
|
|
|
\*****************************************************************************/
|
|
|
|
|
2010-09-25 17:46:12 +02:00
|
|
|
#ifndef __GTK_CHEAT_H
|
|
|
|
#define __GTK_CHEAT_H
|
|
|
|
|
2010-09-26 11:19:15 +02:00
|
|
|
#include "gtk_builder_window.h"
|
2010-09-25 17:46:12 +02:00
|
|
|
|
2020-07-05 00:53:38 +02:00
|
|
|
void open_snes9x_cheats_dialog();
|
|
|
|
|
|
|
|
enum {
|
|
|
|
TYPE_GAME_GENIE = 0,
|
2018-11-02 21:47:31 +01:00
|
|
|
TYPE_ACTION_REPLAY = 1,
|
2020-07-05 00:53:38 +02:00
|
|
|
TYPE_GOLDFINGER = 2
|
2018-11-02 21:47:31 +01:00
|
|
|
};
|
2010-09-25 17:46:12 +02:00
|
|
|
|
2010-09-26 11:19:15 +02:00
|
|
|
class Snes9xCheats : public GtkBuilderWindow
|
2010-09-25 17:46:12 +02:00
|
|
|
{
|
2020-07-05 00:53:38 +02:00
|
|
|
public:
|
|
|
|
Snes9xCheats();
|
|
|
|
~Snes9xCheats();
|
|
|
|
void show();
|
|
|
|
void add_code();
|
|
|
|
void remove_code();
|
|
|
|
void search_database();
|
|
|
|
void delete_all_cheats();
|
|
|
|
void toggle_code(const Glib::ustring &path);
|
|
|
|
void row_activated(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *column);
|
|
|
|
void row_deleted(int src_row);
|
|
|
|
void row_inserted(int row);
|
|
|
|
void enable_dnd(bool);
|
|
|
|
void sort_cheats();
|
|
|
|
void update_code();
|
|
|
|
void disable_all();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void refresh_tree_view();
|
|
|
|
int get_selected_index();
|
|
|
|
int get_index_from_path(const Glib::ustring &path);
|
|
|
|
int get_index_from_path(Gtk::TreeModel::Path path);
|
|
|
|
|
|
|
|
sigc::connection insert_id;
|
|
|
|
sigc::connection delete_id;
|
|
|
|
int dst_row;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> store;
|
2010-09-25 17:46:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __GTK_CHEAT_H */
|