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
|
|
|
|
2018-11-02 21:47:31 +01:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
TYPE_GAME_GENIE = 0,
|
|
|
|
TYPE_ACTION_REPLAY = 1,
|
|
|
|
TYPE_GOLDFINGER = 2
|
|
|
|
};
|
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
|
|
|
{
|
|
|
|
public:
|
2018-11-02 21:52:26 +01:00
|
|
|
Snes9xCheats ();
|
|
|
|
~Snes9xCheats ();
|
|
|
|
void show ();
|
|
|
|
void add_code ();
|
|
|
|
void remove_code ();
|
|
|
|
void search_database ();
|
|
|
|
void delete_all_cheats ();
|
2018-04-28 03:35:20 +02:00
|
|
|
void toggle_code (const gchar *path, int enabled);
|
|
|
|
void row_activated (GtkTreePath *path);
|
2018-06-05 02:27:24 +02:00
|
|
|
void row_deleted (int src_row);
|
|
|
|
void row_inserted (int row);
|
|
|
|
void enable_dnd (bool);
|
2018-11-02 21:52:26 +01:00
|
|
|
void sort_cheats ();
|
|
|
|
void update_code ();
|
|
|
|
void disable_all ();
|
2010-09-25 17:46:12 +02:00
|
|
|
|
|
|
|
private:
|
2018-11-02 21:52:26 +01:00
|
|
|
void refresh_tree_view ();
|
|
|
|
int get_selected_index ();
|
2010-09-25 17:46:12 +02:00
|
|
|
int get_index_from_path (const gchar *path);
|
|
|
|
|
2018-06-05 02:27:24 +02:00
|
|
|
unsigned long insert_id;
|
|
|
|
unsigned long delete_id;
|
|
|
|
int dst_row;
|
2010-09-25 17:46:12 +02:00
|
|
|
GtkListStore *store;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __GTK_CHEAT_H */
|