seems to work
This commit is contained in:
parent
2c44efeb2f
commit
d7d6ae1479
47 changed files with 533 additions and 38 deletions
|
|
@ -4,7 +4,7 @@
|
|||
#include <MwCXX/MachDep.h>
|
||||
#include <MwCXX/Widget/Base.h>
|
||||
|
||||
#define MWCXX_CONSTRUCTOR(name, parent_class) name(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : parent_class(name, parent, x, y, width, height)
|
||||
#define MWCXX_CONSTRUCTOR(this_class, parent_class) this_class(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : parent_class(name, parent, x, y, width, height)
|
||||
|
||||
namespace MwCXX {
|
||||
void Init();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
namespace MwCXX {
|
||||
class Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
MwWidget widget;
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -36,3 +36,15 @@ int GetX();
|
|||
void SetX(int value);
|
||||
int GetY();
|
||||
void SetY(int value);
|
||||
|
||||
virtual void OnClipboard(MwCXX::String value) {};
|
||||
virtual void OnDarkTheme(int value) {};
|
||||
virtual void OnFocusIn() {};
|
||||
virtual void OnFocusOut() {};
|
||||
virtual void OnKey(int value) {};
|
||||
virtual void OnKeyRelease(int value) {};
|
||||
virtual void OnMouseDown(MwMouse value) {};
|
||||
virtual void OnMouseMove(MwPoint value) {};
|
||||
virtual void OnMouseUp(MwMouse value) {};
|
||||
virtual void OnResize() {};
|
||||
virtual void OnTick() {};
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class Box : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
Box(MwWidget widget);
|
||||
Box(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class Button : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
Button(MwWidget widget);
|
||||
Button(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
@ -22,6 +25,9 @@ namespace MwCXX {
|
|||
void SetPadding(int value);
|
||||
int GetFillArea();
|
||||
void SetFillArea(int value);
|
||||
|
||||
virtual void OnActivate() {};
|
||||
virtual void OnChanged() {};
|
||||
};
|
||||
}; // namespace MwCXX
|
||||
|
||||
|
|
|
|||
|
|
@ -8,12 +8,17 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class CheckBox : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
CheckBox(MwWidget widget);
|
||||
CheckBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
||||
int GetChecked();
|
||||
void SetChecked(int value);
|
||||
|
||||
virtual void OnChanged() {};
|
||||
};
|
||||
}; // namespace MwCXX
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class ComboBox : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
ComboBox(MwWidget widget);
|
||||
ComboBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
@ -16,6 +19,8 @@ namespace MwCXX {
|
|||
void SetAreaShown(int value);
|
||||
int GetValue();
|
||||
void SetValue(int value);
|
||||
|
||||
virtual void OnComboBoxChanged(int value) {};
|
||||
};
|
||||
}; // namespace MwCXX
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class Entry : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
Entry(MwWidget widget);
|
||||
Entry(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
@ -16,6 +19,9 @@ namespace MwCXX {
|
|||
void SetText(MwCXX::String value);
|
||||
int GetHideInput();
|
||||
void SetHideInput(int value);
|
||||
|
||||
virtual void OnActivate() {};
|
||||
virtual void OnChanged() {};
|
||||
};
|
||||
}; // namespace MwCXX
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class Frame : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
Frame(MwWidget widget);
|
||||
Frame(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class Image : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
Image(MwWidget widget);
|
||||
Image(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class Label : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
Label(MwWidget widget);
|
||||
Label(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class ListBox : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
ListBox(MwWidget widget);
|
||||
ListBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
@ -18,6 +21,8 @@ namespace MwCXX {
|
|||
void SetHasHeading(int value);
|
||||
int GetSingleClickSelectable();
|
||||
void SetSingleClickSelectable(int value);
|
||||
|
||||
virtual void OnListBoxActivate(int value) {};
|
||||
};
|
||||
}; // namespace MwCXX
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,14 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class Menu : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
Menu(MwWidget widget);
|
||||
Menu(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
||||
virtual void OnMenu(void* value) {};
|
||||
};
|
||||
}; // namespace MwCXX
|
||||
|
||||
|
|
|
|||
|
|
@ -8,12 +8,18 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class NumberEntry : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
NumberEntry(MwWidget widget);
|
||||
NumberEntry(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
||||
MwCXX::String GetText();
|
||||
void SetText(MwCXX::String value);
|
||||
|
||||
virtual void OnActivate() {};
|
||||
virtual void OnChanged() {};
|
||||
};
|
||||
}; // namespace MwCXX
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class OpenGL : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
OpenGL(MwWidget widget);
|
||||
OpenGL(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class ProgressBar : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
ProgressBar(MwWidget widget);
|
||||
ProgressBar(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
|
|||
|
|
@ -8,12 +8,17 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class RadioBox : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
RadioBox(MwWidget widget);
|
||||
RadioBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
||||
int GetChecked();
|
||||
void SetChecked(int value);
|
||||
|
||||
virtual void OnChanged() {};
|
||||
};
|
||||
}; // namespace MwCXX
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class ScrollBar : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
ScrollBar(MwWidget widget);
|
||||
ScrollBar(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
@ -24,6 +27,8 @@ namespace MwCXX {
|
|||
void SetMaxValue(int value);
|
||||
int GetOrientation();
|
||||
void SetOrientation(int value);
|
||||
|
||||
virtual void OnChanged() {};
|
||||
};
|
||||
}; // namespace MwCXX
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class SubMenu : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
SubMenu(MwWidget widget);
|
||||
SubMenu(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class TreeView : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
TreeView(MwWidget widget);
|
||||
TreeView(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
@ -16,6 +19,8 @@ namespace MwCXX {
|
|||
void SetLeftPadding(int value);
|
||||
int GetSingleClickSelectable();
|
||||
void SetSingleClickSelectable(int value);
|
||||
|
||||
virtual void OnTreeViewActivate(void* value) {};
|
||||
};
|
||||
}; // namespace MwCXX
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class Viewport : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
Viewport(MwWidget widget);
|
||||
Viewport(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class Vulkan : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
Vulkan(MwWidget widget);
|
||||
Vulkan(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace MwCXX {
|
||||
class Window : public MwCXX::Base {
|
||||
protected:
|
||||
virtual void RegisterHandlers();
|
||||
|
||||
public:
|
||||
Window(MwWidget widget);
|
||||
Window(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue