34 lines
670 B
C++
34 lines
670 B
C++
#ifndef FILE_MANAGER_H
|
|
#define FILE_MANAGER_H
|
|
|
|
#include "piconsole.h"
|
|
#include "pidir.h"
|
|
|
|
extern PIConsole console;
|
|
|
|
class FileManager: public PIObject {
|
|
PIOBJECT(FileManager)
|
|
public:
|
|
FileManager();
|
|
|
|
void enable() {enabled = true; updateDir(); updateConsole();}
|
|
void disable() {enabled = false;}
|
|
|
|
private:
|
|
EVENT_HANDLER1(void, keyEvent, char, key);
|
|
EVENT(menuRequest);
|
|
void updateConsole();
|
|
void updateDir();
|
|
void buildNames();
|
|
|
|
int offset, cur, height;
|
|
bool enabled, del_commit;
|
|
PIDir dir;
|
|
PIVector<PIFile::FileInfo> files;
|
|
PIMap<PIString, int> prev_pos, prev_off;
|
|
PIStringList selected;
|
|
};
|
|
|
|
|
|
#endif // FILE_MANAGER_H
|