-
Notifications
You must be signed in to change notification settings - Fork 15
/
commander.h
executable file
·78 lines (57 loc) · 1.69 KB
/
commander.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#ifndef _COMMANDER_H_
#define _COMMANDER_H_
#include <SDL.h>
#include "panel.h"
#include "sdl_ttf_multifont.h"
#include "window.h"
class CCommander : public CWindow
{
public:
// Constructor
CCommander(const std::string &p_pathL, const std::string &p_pathR);
// Destructor
virtual ~CCommander(void);
private:
// Forbidden
CCommander(void);
CCommander(const CCommander &p_source);
const CCommander &operator =(const CCommander &p_source);
// Window resized.
void onResize() override;
// Key press management
bool keyPress(const SDL_Event &event, SDLC_Keycode key,
ControllerButton button) override;
// Key hold management
bool keyHold() override;
#if SDL_VERSION_ATLEAST(2, 0, 0)
bool gamepadHold(SDL_GameController *controller) override;
#endif
bool mouseDown(int button, int x, int y) override;
bool mouseWheel(int dx, int dy) override;
CPanel* focusPanelAt(int *x, int *y, bool *changed);
// Draw
virtual void render(const bool p_focus) const;
// Is window full screen?
virtual bool isFullScreen(void) const;
// Open the file operation menus
bool itemMenu() const;
bool operationMenu() const;
void ViewFile(std::string &&path) const;
const bool openCopyMenu(void) const;
void openExecuteMenu(void) const;
// Open the selection menu
const bool openSystemMenu(void);
// Repeated actions.
bool actionUp();
bool actionDown();
bool actionSelect();
bool actionPageUp();
bool actionPageDown();
// The two panels
CPanel m_panelLeft;
CPanel m_panelRight;
CPanel* m_panelSource;
CPanel* m_panelTarget;
SDL_Surface *m_background;
};
#endif