Enigma 3.2.2
A Simple, Reliable and Efficient Encryption Tool
Loading...
Searching...
No Matches
MyEncryptionsScene.hpp
Go to the documentation of this file.
1#pragma once
2#include "Scene.hpp"
3
5
7
8class MyEncryptionsScene : public Enigma::Scene {
9 public: /* Constructors / Destructor */
11 virtual ~MyEncryptionsScene() noexcept = default;
12
13 private: /* Overrides */
14 void OnCreate() override;
15 [[maybe_unused]] void OnUpdate(const float&) override;
16 void OnDraw() override;
17 void OnImGuiDraw() override;
18 [[maybe_unused]] void OnEvent(Event&) override;
19 void OnDestroy() override;
20
21 private: /* Callbacks */
22 void OnBackButtonPressed();
23 void OnViewEncryptionButtonPressed(const std::int64_t ide);
24 // returns true if item deleted successfully to notify draw loop that vector range changed
25 bool OnDeleteEncryptionButtonPressed(const std::int64_t ide);
26 void OnSearchEncryptionsByTitle();
27 void OnDeleteAllEncryptions();
28 //void OnExportAllEncryptionsJSON();
29
30 private: /* Initializers */
31 // Get all Encryptions from database
32 void GetAllEncryptions();
34 void ReformatEncryptionsDateTime();
35 void ResetSearch();
36
37 private:
38 std::vector<std::unique_ptr<Encryption>> m_encryptions{}; // encryption records from database
39 Database::OrderBy m_order_by = Database::OrderBy::ID; // order by column
40 Database::Order m_order = Database::Order::Descending; // order desc/asc
41
42
43 std::string m_query{}; // title search query
44 bool m_isSearching{false};
45};
46
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition Macros.hpp:13
#define NS_ENIGMA_END
Definition Macros.hpp:14
virtual ~MyEncryptionsScene() noexcept=default