52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
#ifndef __MWCXX_WIDGET_BASE_H__
|
|
#define __MWCXX_WIDGET_BASE_H__
|
|
|
|
#include <MwCXX/MachDep.h>
|
|
|
|
namespace MwCXX {
|
|
class Base {
|
|
protected:
|
|
virtual void RegisterHandlers();
|
|
|
|
MwWidget widget;
|
|
|
|
MwCXX::Base* parent;
|
|
std::vector<MwCXX::Base*> children;
|
|
|
|
public:
|
|
Base(MwWidget widget, MwCXX::Base* parent = NULL);
|
|
Base(MwClass widget_class, MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);
|
|
~Base();
|
|
|
|
MwRect GetArea();
|
|
void SetArea(MwRect r);
|
|
|
|
void Move(int x, int y);
|
|
void Resize(unsigned int width, unsigned int height);
|
|
|
|
int Step();
|
|
int Pending();
|
|
void Loop();
|
|
|
|
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);
|
|
|
|
#include <MwCXX/Widget/BaseAuto.h>
|
|
};
|
|
}; // namespace MwCXX
|
|
|
|
#endif
|