version 0.5.0_alpha
git-svn-id: svn://db.shs.com.ru/pip@8 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -1,32 +1,44 @@
|
||||
#ifndef FILE_MANAGER_H
|
||||
#define FILE_MANAGER_H
|
||||
|
||||
#include "piconsole.h"
|
||||
#include "piscreentiles.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;}
|
||||
PIScreenTile * tile() const;
|
||||
|
||||
private:
|
||||
EVENT_HANDLER1(void, keyEvent, char, key);
|
||||
class TileDir: public TileList {
|
||||
public:
|
||||
TileDir();
|
||||
void updateDir();
|
||||
void buildNames();
|
||||
bool keyEvent(PIKbdListener::KeyEvent key);
|
||||
void sizeHint(int & w, int & h) const;
|
||||
void resizeEvent(int w, int h);
|
||||
void lock();
|
||||
void unlock();
|
||||
TileSimple * label_path;
|
||||
PIVector<PIFile::FileInfo> entries;
|
||||
PIDir dir;
|
||||
PIMap<PIString, PIPair<int, int> > prev_pos;
|
||||
bool resized;
|
||||
};
|
||||
|
||||
EVENT_HANDLER1(void, keyEvent, PIKbdListener::KeyEvent, 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;
|
||||
TileDir * panels[2];
|
||||
PIScreenTile * tile_root;
|
||||
PIStringList selected;
|
||||
typedef PIPair<PIString, PIString> SSPair;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user