git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@209 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-08 08:46:56 +00:00
parent 951dcc054a
commit fc3450ae03
19 changed files with 192 additions and 80 deletions

View File

@@ -22,6 +22,7 @@
#include <Mw/Widget/Menu.h>
#include <Mw/Widget/SubMenu.h>
#include <Mw/Widget/Button.h>
#include <Mw/Widget/CheckBox.h>
#include <Mw/Widget/Frame.h>
#include <Mw/Widget/Image.h>
#include <Mw/Widget/ScrollBar.h>

View File

@@ -15,6 +15,7 @@
#define MwNmaxValue "ImaxValue"
#define MwNvalue "Ivalue"
#define MwNareaShown "IareaShown"
#define MwNchecked "Ichecked"
#define MwNtitle "Stitle"
#define MwNtext "Stext"
@@ -30,5 +31,6 @@
#define MwNmenuHandler "Cmenu"
#define MwNmouseDownHandler "CmouseDownHandler"
#define MwNmouseUpHandler "CmouseUpHandler"
#define MwNchangedHandler "CchangedHandler"
#endif

View File

@@ -0,0 +1,26 @@
/* $Id: CheckBox.h 206 2025-10-07 15:10:46Z nishi $ */
/*!
* %file Mw/Widget/CheckBox.h
* %brief CheckBox widget
* %prop MwNpixmap
*/
#ifndef __MW_WIDGET_CHECKBOX_H__
#define __MW_WIDGET_CHECKBOX_H__
#include <Mw/MachDep.h>
#include <Mw/TypeDefs.h>
#ifdef __cplusplus
extern "C" {
#endif
/*!
* %brief CheckBox widget class
*/
MWDECL MwClass MwCheckBoxClass;
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -26,15 +26,16 @@ class Base {
int GetY(void);
int GetWidth(void);
int GetHeight(void);
/* BEGIN AUTOGENERATE */
virtual void OnActivate(void*) {};
virtual void OnResize(void*) {};
virtual void OnTick(void*) {};
virtual void OnMenu(void*) {};
virtual void OnMouseDownHandler(void*) {};
virtual void OnMouseUpHandler(void*) {};
/* BEGIN AUTOGENERATE */
virtual void OnActivate(void*){};
virtual void OnResize(void*){};
virtual void OnTick(void*){};
virtual void OnMenu(void*){};
virtual void OnMouseDownHandler(void*){};
virtual void OnMouseUpHandler(void*){};
virtual void OnChangedHandler(void*){};
/* END AUTOGENERATE */
/* END AUTOGENERATE */
Base(MwClass widget_class, const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
~Base(void);

View File

@@ -5,12 +5,12 @@
#include <MwOO/Base.h>
namespace MwOO {
class Button : public MwOO::Base {
public:
Button(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
void SetPixmap(void* value);
void* GetPixmap(void);
};
} // namespace MwOO
class Button : public MwOO::Base {
public:
Button(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
void SetPixmap(void* value);
void* GetPixmap(void);
};
}
#endif

View File

@@ -0,0 +1,16 @@
/* $Id$ */
#ifndef __MWOO_WIDGET_CHECKBOX_H__
#define __MWOO_WIDGET_CHECKBOX_H__
#include <MwOO/Base.h>
namespace MwOO {
class CheckBox : public MwOO::Base {
public:
CheckBox(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
void SetPixmap(void* value);
void* GetPixmap(void);
};
}
#endif

View File

@@ -5,10 +5,10 @@
#include <MwOO/Base.h>
namespace MwOO {
class Frame : public MwOO::Base {
public:
Frame(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
};
} // namespace MwOO
class Frame : public MwOO::Base {
public:
Frame(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
};
}
#endif

View File

@@ -5,12 +5,12 @@
#include <MwOO/Base.h>
namespace MwOO {
class Image : public MwOO::Base {
public:
Image(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
void SetPixmap(void* value);
void* GetPixmap(void);
};
} // namespace MwOO
class Image : public MwOO::Base {
public:
Image(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
void SetPixmap(void* value);
void* GetPixmap(void);
};
}
#endif

View File

@@ -5,11 +5,11 @@
#include <MwOO/Base.h>
namespace MwOO {
class Menu : public MwOO::Base {
public:
Menu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
MwMenu Add(MwMenu menu, const char* name);
};
} // namespace MwOO
class Menu : public MwOO::Base {
public:
Menu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
MwMenu Add(MwMenu menu, const char* name);
};
}
#endif

View File

@@ -5,13 +5,13 @@
#include <MwOO/Base.h>
namespace MwOO {
class OpenGL : public MwOO::Base {
public:
OpenGL(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
void MakeCurrent(void);
void* GetProcAddress(const char* name);
void SwapBuffer(void);
};
} // namespace MwOO
class OpenGL : public MwOO::Base {
public:
OpenGL(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
void MakeCurrent(void);
void* GetProcAddress(const char* name);
void SwapBuffer(void);
};
}
#endif

View File

@@ -5,21 +5,21 @@
#include <MwOO/Base.h>
namespace MwOO {
class ScrollBar : public MwOO::Base {
public:
ScrollBar(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
int GetVisibleLength(void);
void SetAreaShown(int value);
int GetAreaShown(void);
void SetValue(int value);
int GetValue(void);
void SetMinValue(int value);
int GetMinValue(void);
void SetMaxValue(int value);
int GetMaxValue(void);
void SetOrientation(int value);
int GetOrientation(void);
};
} // namespace MwOO
class ScrollBar : public MwOO::Base {
public:
ScrollBar(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
int GetVisibleLength(void);
void SetAreaShown(int value);
int GetAreaShown(void);
void SetValue(int value);
int GetValue(void);
void SetMinValue(int value);
int GetMinValue(void);
void SetMaxValue(int value);
int GetMaxValue(void);
void SetOrientation(int value);
int GetOrientation(void);
};
}
#endif

View File

@@ -5,11 +5,11 @@
#include <MwOO/Base.h>
namespace MwOO {
class SubMenu : public MwOO::Base {
public:
SubMenu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
void Appear(MwMenu menu, MwPoint* point);
};
} // namespace MwOO
class SubMenu : public MwOO::Base {
public:
SubMenu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
void Appear(MwMenu menu, MwPoint* point);
};
}
#endif

View File

@@ -5,15 +5,15 @@
#include <MwOO/Base.h>
namespace MwOO {
class Vulkan : public MwOO::Base {
public:
Vulkan(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
void EnableExtension(void);
void EnableLayer(void);
void Configure(void);
void* GetField(MwVulkanField field, MwErrorEnum* out);
VkBool32 Supported(void);
};
} // namespace MwOO
class Vulkan : public MwOO::Base {
public:
Vulkan(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
void EnableExtension(void);
void EnableLayer(void);
void Configure(void);
void* GetField(MwVulkanField field, MwErrorEnum* out);
VkBool32 Supported(void);
};
}
#endif

View File

@@ -5,10 +5,10 @@
#include <MwOO/Base.h>
namespace MwOO {
class Window : public MwOO::Base {
public:
Window(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
};
} // namespace MwOO
class Window : public MwOO::Base {
public:
Window(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
};
}
#endif