-
Notifications
You must be signed in to change notification settings - Fork 2
/
FormPanel.h
65 lines (55 loc) · 2.08 KB
/
FormPanel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//---------------------------------------------------------------------------
#ifndef FormPanelH
#define FormPanelH
//---------------------------------------------------------------------------
#include <FMX.Controls.hpp>
#include <FMX.Controls.Presentation.hpp>
#include <FMX.Layouts.hpp>
#include <FMX.Objects.hpp>
#include <FMX.StdCtrls.hpp>
#include <FMX.Types.hpp>
#include <System.Classes.hpp>
#include "FMXFormPanelBase.h"
#include "FrameNum.h"
#include <array>
#include <memory>
//---------------------------------------------------------------------------
using TNumEvent =
void __fastcall (__closure *)( System::TObject* Sender, int Num, bool Val );
class TfrmPanel : public TfrmPanelBase
{
__published: // IDE-managed Components
TGridLayout *GridLayout1;
TLayout *Layout1;
TRectangle *Rectangle1;
TImage *Image1;
private: // User declarations
std::array<bool,90> states_;
std::array<std::unique_ptr<TfrmeNum>,90> numFrames_;
TNumEvent onNumberChanged_ { nullptr };
int currNum_ {};
static constexpr auto TabsNodeName = _T( "Tabs" );
void RestoreProperties();
void SaveProperties() const;
String GetTabsText() const;
void SetTabsText( String Val );
void NotifyNumberChanged( int Num, bool Val );
public: // User declarations
using inherited = TfrmPanelBase;
__fastcall TfrmPanel( TComponent* Owner,
FMXWinDisplayDev const * Display,
StoreOpts StoreOptions,
Anafestica::TConfigNode* const RootNode = nullptr,
TNumEvent OnNumberChanged = nullptr );
__fastcall ~TfrmPanel();
bool GetTab( size_t Idx ) const;
bool SetTab( size_t Idx, bool Val );
bool ToggleTab( size_t Idx );
void Clear();
__property String TabsText = { read = GetTabsText, write = SetTabsText };
__property int CurrNum = { read = currNum_ };
};
//---------------------------------------------------------------------------
//extern PACKAGE TfrmPanel *frmPanel;
//---------------------------------------------------------------------------
#endif