2026-04-17 19:42:14 +09:00
|
|
|
#ifndef __MWCXX_WIDGET_BASE_H__
|
|
|
|
|
#define __MWCXX_WIDGET_BASE_H__
|
|
|
|
|
|
|
|
|
|
#include <MwCXX/MachDep.h>
|
|
|
|
|
|
|
|
|
|
namespace MwCXX {
|
|
|
|
|
class Base {
|
2026-04-17 21:26:28 +09:00
|
|
|
protected:
|
2026-04-17 22:25:28 +09:00
|
|
|
virtual void RegisterHandlers();
|
|
|
|
|
|
2026-04-17 21:26:28 +09:00
|
|
|
MwWidget widget;
|
2026-04-17 19:42:14 +09:00
|
|
|
|
2026-04-18 02:31:46 +09:00
|
|
|
MwCXX::Base* parent;
|
2026-04-18 01:05:20 +09:00
|
|
|
std::vector<MwCXX::Base*> children;
|
|
|
|
|
|
2026-04-17 21:26:28 +09:00
|
|
|
public:
|
2026-04-18 01:05:20 +09:00
|
|
|
Base(MwWidget widget, MwCXX::Base* parent = NULL);
|
2026-04-17 21:26:28 +09:00
|
|
|
Base(MwClass widget_class, MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
2026-04-18 01:05:20 +09:00
|
|
|
~Base();
|
2026-04-17 19:42:14 +09:00
|
|
|
|
2026-04-17 22:44:19 +09:00
|
|
|
MwRect GetArea();
|
|
|
|
|
void SetArea(MwRect r);
|
|
|
|
|
|
|
|
|
|
void Move(int x, int y);
|
|
|
|
|
void Resize(unsigned int width, unsigned int height);
|
|
|
|
|
|
2026-04-18 02:31:46 +09:00
|
|
|
int Step();
|
|
|
|
|
int Pending();
|
2026-04-17 21:26:28 +09:00
|
|
|
void Loop();
|
2026-04-17 19:42:14 +09:00
|
|
|
|
2026-04-18 02:44:34 +09:00
|
|
|
void Show(int toggle);
|
|
|
|
|
void HideCursor();
|
|
|
|
|
void GrabPointer(int toggle);
|
|
|
|
|
void AddTickList();
|
|
|
|
|
void ForceRender();
|
|
|
|
|
void Reparent(MwCXX::Base* new_parent);
|
|
|
|
|
|
|
|
|
|
MwCXX::Base* GetParent();
|
|
|
|
|
std::vector<MwCXX::Base*> GetChildren();
|
|
|
|
|
|
|
|
|
|
MwWidget GetWidget();
|
|
|
|
|
MwCXX::String GetName();
|
|
|
|
|
MwPoint GetCursorCoord();
|
|
|
|
|
MwRect GetScreenSize();
|
|
|
|
|
int GetCoordinateType();
|
|
|
|
|
void GetClipboard(int clipboard_type);
|
2026-04-18 02:31:46 +09:00
|
|
|
|
2026-04-17 19:42:14 +09:00
|
|
|
#include <MwCXX/Widget/BaseAuto.h>
|
|
|
|
|
};
|
|
|
|
|
}; // namespace MwCXX
|
|
|
|
|
|
|
|
|
|
#endif
|