-
Notifications
You must be signed in to change notification settings - Fork 4
/
CustomWidget.h
67 lines (48 loc) · 1.87 KB
/
CustomWidget.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
66
67
/******************************************************************************
CustomWidget.h
Copyright (C) 2023 by John Lindal.
******************************************************************************/
#ifndef _H_CustomWidget
#define _H_CustomWidget
#include "BaseWidget.h"
class CustomWidgetPanel;
class CustomWidget : public BaseWidget
{
public:
CustomWidget(LayoutContainer* layout,
const HSizingOption hSizing, const VSizingOption vSizing,
const JCoordinate x, const JCoordinate y,
const JCoordinate w, const JCoordinate h);
CustomWidget(const JString& className, const JString& args, const bool create,
LayoutContainer* layout,
const HSizingOption hSizing, const VSizingOption vSizing,
const JCoordinate x, const JCoordinate y,
const JCoordinate w, const JCoordinate h);
CustomWidget(std::istream& input, const JFileVersion vers, LayoutContainer* layout,
const HSizingOption hSizing, const VSizingOption vSizing,
const JCoordinate x, const JCoordinate y,
const JCoordinate w, const JCoordinate h);
~CustomWidget() override;
void StreamOut(std::ostream& output) const override;
JString ToString() const override;
protected:
void Draw(JXWindowPainter& p, const JRect& rect) override;
void DrawBorder(JXWindowPainter& p, const JRect& frame) override;
JString GetClassName() const override;
JString GetCtor() const override;
void PrintCtorArgsWithComma(std::ostream& output,
const JString& varName,
JStringManager* stringdb) const override;
bool WaitForCodeDependency(const JPtrArray<JString>& objNames) const override;
void AddPanels(WidgetParametersDialog* dlog) override;
void SavePanelData() override;
private:
JString itsClassName;
JString itsCtorArgs;
bool itsCreateFlag;
JString itsDependencyNames;
CustomWidgetPanel* itsPanel; // nullptr unless editing
private:
void CustomWidgetX();
};
#endif