Simple Nano Circuit 0.0.2
BaseElectronObject.h
1#ifndef _BaseElectronObjec_H_
2#define _BaseElectronObjec_H_
3
4#include <fstream>
5
6#include "constant.h"
7#include "AsgardClass.h"
8#include "ICType.h"
9
11
13{
14 private:
15
16 public:
17 enum class RendererEffective
18 {
19 Valid = 1,
20 Invalid
21 };
22
23 // IC 在画布上拖动时,自身每次可移动的最小距离
24 const int moveMinStepLength = MIN_STEP_LENGTH;
25
26 AsgardClass* asgard = nullptr;
27
29
30 virtual ~BaseElectronObject() = default;
31 virtual const ICType getType() const = 0;
32
33 virtual void Drawing() = 0;
34 virtual void Drawing( BaseElectronObject::RendererEffective ) = 0;
35
36 virtual BaseElectronObject* processClickEvent( SDL_Point& ) = 0;
37 virtual void processKeyEvent( int ) = 0;
38
39 virtual BaseElectronObject* deepDuplicateSelf() = 0;
40
41 virtual SDL_Rect getLocationRect() = 0;
42
43 virtual const char* popupWindowName() const = 0;
44 virtual bool havePopupWindow() = 0;
45 virtual void CreateImGuiForm() = 0;
46
47 virtual void saveToFile(std::ofstream&) = 0;
48 virtual void processMouseMotion(const SDL_Point&) = 0;
49};
50
51#endif
Definition: AsgardClass.h:17
Definition: BaseElectronObject.h:13
Definition: PlacementManagerClass.h:18