This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
The-Powder-Toy/src/gui/options/keyboardbindings/KeyboardBindingsController.h
2019-09-17 19:44:29 +02:00

42 lines
1.0 KiB
C++

#ifndef KEYBOARDBINDINGSCONTROLLER_H
#define KEYBOARDBINDINGSCONTROLLER_H
#include <vector>
class ControllerCallback;
class KeyboardBindingsView;
class GameModel;
class OptionsController;
class KeyboardBindingsModel;
struct BindingModel;
class KeyboardBindingsController
{
ControllerCallback * callback;
KeyboardBindingsView* view;
KeyboardBindingsModel* model;
OptionsController* parent;
public:
bool HasExited;
KeyboardBindingsController(OptionsController* _parent);
void Exit();
KeyboardBindingsView * GetView();
virtual ~KeyboardBindingsController();
void AddModel(BindingModel model);
void CreateModel(BindingModel model);
void ChangeModel(BindingModel model);
void Save();
void ForceHasConflict();
void NotifyKeyReleased();
void OnKeyReleased();
void NotifyBindingsChanged();
void PopBindingByFunctionId(int functionId);
bool FunctionHasShortcut(int functionId);
void ResetToDefaults();
void LoadBindingPrefs();
std::vector<BindingModel> GetBindingPrefs();
};
#endif /* KEYBOARDBINDINGSCONTROLLER_H */