diff --git a/include/MwOO/Base.h b/include/MwOO/Base.h index e5bc290..51b7ead 100644 --- a/include/MwOO/Base.h +++ b/include/MwOO/Base.h @@ -26,16 +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*){}; - virtual void OnChangedHandler(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); diff --git a/include/MwOO/Widget/Button.h b/include/MwOO/Widget/Button.h index 80f72cd..e4cad8e 100644 --- a/include/MwOO/Widget/Button.h +++ b/include/MwOO/Widget/Button.h @@ -5,12 +5,12 @@ #include 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); - }; -} +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 #endif diff --git a/include/MwOO/Widget/CheckBox.h b/include/MwOO/Widget/CheckBox.h index ec3ee7b..9dd4662 100644 --- a/include/MwOO/Widget/CheckBox.h +++ b/include/MwOO/Widget/CheckBox.h @@ -5,12 +5,12 @@ #include 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); - }; -} +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); +}; +} // namespace MwOO #endif diff --git a/include/MwOO/Widget/Frame.h b/include/MwOO/Widget/Frame.h index 84ddc30..f5d7057 100644 --- a/include/MwOO/Widget/Frame.h +++ b/include/MwOO/Widget/Frame.h @@ -5,10 +5,10 @@ #include namespace MwOO { - class Frame : public MwOO::Base { - public: - Frame(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); - }; -} +class Frame : public MwOO::Base { + public: + Frame(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); +}; +} // namespace MwOO #endif diff --git a/include/MwOO/Widget/Image.h b/include/MwOO/Widget/Image.h index e9eb8f6..3864020 100644 --- a/include/MwOO/Widget/Image.h +++ b/include/MwOO/Widget/Image.h @@ -5,12 +5,12 @@ #include 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); - }; -} +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 #endif diff --git a/include/MwOO/Widget/Menu.h b/include/MwOO/Widget/Menu.h index 83c624b..5d9d4a1 100644 --- a/include/MwOO/Widget/Menu.h +++ b/include/MwOO/Widget/Menu.h @@ -5,11 +5,11 @@ #include 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); - }; -} +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 #endif diff --git a/include/MwOO/Widget/OpenGL.h b/include/MwOO/Widget/OpenGL.h index eb53dd3..e2276ae 100644 --- a/include/MwOO/Widget/OpenGL.h +++ b/include/MwOO/Widget/OpenGL.h @@ -5,13 +5,13 @@ #include 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); - }; -} +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 #endif diff --git a/include/MwOO/Widget/ScrollBar.h b/include/MwOO/Widget/ScrollBar.h index 7bae3f2..a361a81 100644 --- a/include/MwOO/Widget/ScrollBar.h +++ b/include/MwOO/Widget/ScrollBar.h @@ -5,21 +5,21 @@ #include 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); - }; -} +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 #endif diff --git a/include/MwOO/Widget/SubMenu.h b/include/MwOO/Widget/SubMenu.h index af7f338..38c24c9 100644 --- a/include/MwOO/Widget/SubMenu.h +++ b/include/MwOO/Widget/SubMenu.h @@ -5,11 +5,11 @@ #include 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); - }; -} +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 #endif diff --git a/include/MwOO/Widget/Vulkan.h b/include/MwOO/Widget/Vulkan.h index fdab378..ff74da2 100644 --- a/include/MwOO/Widget/Vulkan.h +++ b/include/MwOO/Widget/Vulkan.h @@ -5,15 +5,15 @@ #include 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); - }; -} +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 #endif diff --git a/include/MwOO/Widget/Window.h b/include/MwOO/Widget/Window.h index 8f96124..0d07a21 100644 --- a/include/MwOO/Widget/Window.h +++ b/include/MwOO/Widget/Window.h @@ -5,10 +5,10 @@ #include namespace MwOO { - class Window : public MwOO::Base { - public: - Window(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); - }; -} +class Window : public MwOO::Base { + public: + Window(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); +}; +} // namespace MwOO #endif diff --git a/src/widget/checkbox.c b/src/widget/checkbox.c index cfa146c..942825d 100644 --- a/src/widget/checkbox.c +++ b/src/widget/checkbox.c @@ -10,8 +10,8 @@ static int create(MwWidget handle) { } static void draw(MwWidget handle) { - MwRect r; - MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwRect r; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); r.x = 0; r.y = 0; @@ -20,7 +20,7 @@ static void draw(MwWidget handle) { MwDrawFrame(handle, &r, base, (handle->pressed || MwGetInteger(handle, MwNchecked)) ? 1 : 0); MwDrawRect(handle, &r, base); - if(handle->pressed || MwGetInteger(handle, MwNchecked)){ + if(handle->pressed || MwGetInteger(handle, MwNchecked)) { /* TODO: write check mark */ }