2013-11-28 10:29:01 +00:00
|
|
|
struct StateManager : ToolsLayout {
|
2012-05-06 06:34:46 +00:00
|
|
|
ListView stateList;
|
|
|
|
HorizontalLayout descLayout;
|
|
|
|
Label descLabel;
|
|
|
|
LineEdit descEdit;
|
|
|
|
HorizontalLayout controlLayout;
|
|
|
|
Button saveButton;
|
|
|
|
Button loadButton;
|
|
|
|
Widget spacer;
|
|
|
|
Button resetButton;
|
|
|
|
Button eraseButton;
|
|
|
|
|
|
|
|
void reset();
|
2013-05-05 09:21:30 +00:00
|
|
|
bool load(string filename, unsigned revision);
|
|
|
|
bool save(string filename, unsigned revision);
|
2012-05-06 06:34:46 +00:00
|
|
|
|
|
|
|
void slotLoad();
|
|
|
|
void slotSave();
|
|
|
|
void slotErase();
|
|
|
|
string slotLoadDescription(unsigned id);
|
|
|
|
void slotSaveDescription();
|
|
|
|
|
|
|
|
void refresh();
|
|
|
|
void synchronize();
|
|
|
|
StateManager();
|
|
|
|
|
|
|
|
private:
|
|
|
|
enum : unsigned {
|
|
|
|
Slots = 32,
|
|
|
|
HeaderLength = 72,
|
|
|
|
DescriptionLength = 512,
|
|
|
|
};
|
|
|
|
serializer slot[Slots];
|
|
|
|
};
|
|
|
|
|
2013-05-02 11:25:45 +00:00
|
|
|
extern StateManager* stateManager;
|