- WiFi Connect app is now hidden by default, but accessible at the bottom of the WiFi Manage app when WiFi is turned on. - WiFi service now turns on WiFi when calling connect() and WiFi is not on. - Removed `blocking` option for `service::loader::startApp()`. This feature was unused and complex. - Various apps: Moved private headers into Private/ folder. - Various apps: created start() function for easy starting. - Added documentation to all TactilityC APIs - Refactored various `enum` into `class enum` - Refactor M5Stack `initBoot()` (but VBus is still 0V for some reason)
42 lines
953 B
C++
42 lines
953 B
C++
#pragma once
|
|
|
|
#include "./State.h"
|
|
|
|
#include "app/AppManifest.h"
|
|
#include <lvgl.h>
|
|
#include <memory>
|
|
|
|
namespace tt::app::files {
|
|
|
|
class View {
|
|
std::shared_ptr<State> state;
|
|
|
|
lv_obj_t* dir_entry_list = nullptr;
|
|
lv_obj_t* action_list = nullptr;
|
|
lv_obj_t* navigate_up_button = nullptr;
|
|
|
|
void showActionsForDirectory();
|
|
void showActionsForFile();
|
|
|
|
void viewFile(const std::string&path, const std::string&filename);
|
|
void createDirEntryWidget(lv_obj_t* parent, struct dirent& dir_entry);
|
|
void onNavigate();
|
|
|
|
public:
|
|
|
|
explicit View(const std::shared_ptr<State>& state) : state(state) {}
|
|
|
|
void init(lv_obj_t* parent);
|
|
void update();
|
|
|
|
void onNavigateUpPressed();
|
|
void onDirEntryPressed(uint32_t index);
|
|
void onDirEntryLongPressed(int32_t index);
|
|
void onRenamePressed();
|
|
void onDeletePressed();
|
|
void onDirEntryListScrollBegin();
|
|
void onResult(Result result, const Bundle& bundle);
|
|
};
|
|
|
|
}
|